You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by gg...@apache.org on 2017/05/01 18:45:11 UTC

svn commit: r1793397 - /httpcomponents/httpcore/trunk/httpcore5/src/test/java/org/apache/hc/core5/util/TestTimeValue.java

Author: ggregory
Date: Mon May  1 18:45:11 2017
New Revision: 1793397

URL: http://svn.apache.org/viewvc?rev=1793397&view=rev
Log:
Add test.

Modified:
    httpcomponents/httpcore/trunk/httpcore5/src/test/java/org/apache/hc/core5/util/TestTimeValue.java

Modified: httpcomponents/httpcore/trunk/httpcore5/src/test/java/org/apache/hc/core5/util/TestTimeValue.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/test/java/org/apache/hc/core5/util/TestTimeValue.java?rev=1793397&r1=1793396&r2=1793397&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/test/java/org/apache/hc/core5/util/TestTimeValue.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/test/java/org/apache/hc/core5/util/TestTimeValue.java Mon May  1 18:45:11 2017
@@ -138,4 +138,10 @@ public class TestTimeValue {
         test(-1);
     }
 
+    @Test
+    public void testToString() {
+        Assert.assertEquals("9,223,372,036,854,775,807 SECONDS", TimeValue.ofSeconds(Long.MAX_VALUE).toString());
+        Assert.assertEquals("0 MILLISECONDS", TimeValue.ZERO_MILLISECONDS.toString());
+    }
+
 }