xmlbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ra...@apache.org
Subject svn commit: r292357 - /xmlbeans/trunk/test/src/xmlobject/schematypes/checkin/GDateTests.java
Date Thu, 29 Sep 2005 00:20:11 GMT
Author: radup
Date: Wed Sep 28 17:20:07 2005
New Revision: 292357

URL: http://svn.apache.org/viewcvs?rev=292357&view=rev
Log:
Contributed by Wing Yew Poon. New test for GDuration with empty constructor.

Modified:
    xmlbeans/trunk/test/src/xmlobject/schematypes/checkin/GDateTests.java

Modified: xmlbeans/trunk/test/src/xmlobject/schematypes/checkin/GDateTests.java
URL: http://svn.apache.org/viewcvs/xmlbeans/trunk/test/src/xmlobject/schematypes/checkin/GDateTests.java?rev=292357&r1=292356&r2=292357&view=diff
==============================================================================
--- xmlbeans/trunk/test/src/xmlobject/schematypes/checkin/GDateTests.java (original)
+++ xmlbeans/trunk/test/src/xmlobject/schematypes/checkin/GDateTests.java Wed Sep 28 17:20:07
2005
@@ -288,6 +288,27 @@
         Assert.assertEquals("--11-29", gregcal.toString());
     }
 
+    private void _testEmptyDuration(GDuration gd)
+    {
+        assertTrue(gd.isValid());
+        assertEquals("PT0S", gd.toString());
+        assertEquals(0, gd.getYear());
+        assertEquals(0, gd.getMonth());
+        assertEquals(0, gd.getDay());
+        assertEquals(0, gd.getHour());
+        assertEquals(0, gd.getMinute());
+        assertEquals(0, gd.getSecond());
+        assertEquals(new java.math.BigDecimal(0.0), gd.getFraction());
+    }
+
+    public void testEmptyDuration()
+    {
+        GDuration gd = new GDuration();
+        _testEmptyDuration(gd);
+        GDuration gdCopy = new GDuration(gd);
+        _testEmptyDuration(gdCopy);
+    }
+
     public static void testValidDuration()
     {
         for (int i = 0; i < validDurations.length; i++)



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: commits-help@xmlbeans.apache.org


Mime
View raw message