Back to project page DisposableIncome-OldJava.
The source code is released under:
MIT License
If you think the Android project DisposableIncome-OldJava listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package uk.co.wilka.disposableincome.test; //from w w w .j a v a 2 s.c o m import junit.framework.TestCase; import java.util.Calendar; import uk.co.wilka.disposableincome.PlusOneMonthCalendarProvider; /** * TODO: Add tests for * 1. The actual left at the end of this month * 2. The predicted left of the end of this month * 3. The predicted left at the end of /next/ month * * * */ public class PlusOneMonthCalendarProviderTests extends TestCase { public void test_addsOneMonthToCalendarPassedIn() { uk.co.wilka.disposableincome.test.FakeCalendarProvider calendarProvider = new uk.co.wilka.disposableincome.test.FakeCalendarProvider(2012, 5, 5, 5, 5, 5); PlusOneMonthCalendarProvider plusOne = new PlusOneMonthCalendarProvider(calendarProvider); assert(plusOne.getCalendar().after(calendarProvider.getCalendar())); assertEquals(plusOne.getCalendar().get(Calendar.MONTH), calendarProvider.getCalendar().get(Calendar.MONTH) + 1); } }