dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #39072
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19825: added test for daysInMonth
------------------------------------------------------------
revno: 19825
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-08-24 10:56:46 +0700
message:
added test for daysInMonth
modified:
dhis-2/dhis-api/src/test/java/org/hisp/dhis/calendar/impl/EthiopianCalendarTest.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/test/java/org/hisp/dhis/calendar/impl/EthiopianCalendarTest.java'
--- dhis-2/dhis-api/src/test/java/org/hisp/dhis/calendar/impl/EthiopianCalendarTest.java 2015-08-24 03:47:48 +0000
+++ dhis-2/dhis-api/src/test/java/org/hisp/dhis/calendar/impl/EthiopianCalendarTest.java 2015-08-24 03:56:46 +0000
@@ -57,4 +57,20 @@
assertEquals( 9, startOfYear.getMonth() );
assertEquals( 11, startOfYear.getDay() );
}
+
+ @Test
+ public void testDaysInMonth()
+ {
+ int month12 = calendar.daysInMonth( 2007, 12 );
+ int month13 = calendar.daysInMonth( 2007, 13 );
+
+ assertEquals( 36, month12 );
+ assertEquals( 36, month13 );
+
+ month12 = calendar.daysInMonth( 2004, 12 );
+ month13 = calendar.daysInMonth( 2004, 13 );
+
+ assertEquals( 35, month12 );
+ assertEquals( 35, month13 );
+ }
}