Commits

Ville Saalo committed a156a67

Test that the date the cache was published is parsed correctly.

Comments (0)

Files changed (1)

test/geogpxparser/GeoGPXParserTest.java

 
 import java.util.List;
 import java.util.Map;
+import org.joda.time.DateTime;
+import org.joda.time.DateTimeZone;
 import static org.junit.Assert.*;
 import org.junit.Before;
 import org.junit.Test;
     
     @Test
     public void test_published() {
-        //assertEquals("London", cache1.getState());
-        //assertEquals("Oslo", cache2.getState());
+        assertEquals(2001, cache1.getPublished().getYear());
+        assertEquals(10, cache1.getPublished().getMonthOfYear());
+        assertEquals(27, cache1.getPublished().getDayOfMonth());
+        
+        assertEquals(2010, cache2.getPublished().getYear());
+        assertEquals(2, cache2.getPublished().getMonthOfYear());
+        assertEquals(28, cache2.getPublished().getDayOfMonth());
     }
     
     @Test