abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r611688 - /incubator/abdera/java/trunk/core/src/test/java/org/apache/abdera/test/core/CoreTest.java
Date Mon, 14 Jan 2008 00:55:41 GMT
Author: jmsnell
Date: Sun Jan 13 16:55:40 2008
New Revision: 611688

URL: http://svn.apache.org/viewvc?rev=611688&view=rev
Log:
Couple of new atomdate tests

Modified:
    incubator/abdera/java/trunk/core/src/test/java/org/apache/abdera/test/core/CoreTest.java

Modified: incubator/abdera/java/trunk/core/src/test/java/org/apache/abdera/test/core/CoreTest.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/test/java/org/apache/abdera/test/core/CoreTest.java?rev=611688&r1=611687&r2=611688&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/test/java/org/apache/abdera/test/core/CoreTest.java
(original)
+++ incubator/abdera/java/trunk/core/src/test/java/org/apache/abdera/test/core/CoreTest.java
Sun Jan 13 16:55:40 2008
@@ -24,6 +24,7 @@
 import java.io.OutputStream;
 import java.io.StringReader;
 import java.io.Writer;
+import java.util.Calendar;
 import java.util.Comparator;
 import java.util.Date;
 import java.util.Iterator;
@@ -113,6 +114,22 @@
     atomNow = AtomDate.valueOf(rfc3339);
     Date parsed = atomNow.getDate();
     assertEquals(now, parsed);
+  }
+  
+  public static void testAtomDate2() {
+    String date = "2007-12-13T14:15:16.123Z";
+    AtomDate atomDate = new AtomDate(date);
+    Calendar calendar = atomDate.getCalendar();
+    atomDate = new AtomDate(calendar);
+    assertEquals(date,atomDate.toString());
+  }
+  
+  public static void testAtomDate3() {
+    long date = System.currentTimeMillis();
+    AtomDate atomDate = new AtomDate(date);
+    Calendar calendar = atomDate.getCalendar();
+    atomDate = new AtomDate(calendar);
+    assertEquals(date,atomDate.getTime());
   }
   
   public static void testXmlRestrictedCharReader() throws Exception {



Mime
View raw message