Android Open Source - DisposableIncome-OldJava Plus One Month Calendar Provider Tests






From Project

Back to project page DisposableIncome-OldJava.

License

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.

Java Source Code

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);
    }
}




Java Source Code List

uk.co.wilka.disposableincome.CalendarAccess.java
uk.co.wilka.disposableincome.CalendarProvider.java
uk.co.wilka.disposableincome.CashWithdraw.java
uk.co.wilka.disposableincome.CashWithdrawalDetailsActivity.java
uk.co.wilka.disposableincome.Cash.java
uk.co.wilka.disposableincome.DatabaseHelper.java
uk.co.wilka.disposableincome.IAccessData.java
uk.co.wilka.disposableincome.IProvideCalendar.java
uk.co.wilka.disposableincome.MainActivity.java
uk.co.wilka.disposableincome.PlusOneMonthCalendarProvider.java
uk.co.wilka.disposableincome.WithdrawDateComparer.java
uk.co.wilka.disposableincome.WithdrawType.java
uk.co.wilka.disposableincome.WithdrawalForMonthCalculator.java
uk.co.wilka.disposableincome.test.CashTest.java
uk.co.wilka.disposableincome.test.CashWithdrawTest.java
uk.co.wilka.disposableincome.test.FakeCalendarProvider.java
uk.co.wilka.disposableincome.test.PlusOneMonthCalendarProviderTests.java
uk.co.wilka.disposableincome.test.WithdrawDateComparerTests.java
uk.co.wilka.disposableincome.test.WithdrawalForMonthCalculatorTests.java