package com.greef.util;

import java.util.GregorianCalendar;

import junit.framework.TestCase;

/**
 * @author Adrian BER
 */
public class CalendarUtilsTestCase extends TestCase {

    public void testDiffInDays() {
        assertEquals(9, CalendarUtils.diffInDays(new GregorianCalendar(2004, 5, 10),
            new GregorianCalendar(2004, 5, 1)));
        assertEquals(0, CalendarUtils.diffInDays(new GregorianCalendar(2004, 5, 1),
            new GregorianCalendar(2004, 5, 1)));
        assertEquals(-9, CalendarUtils.diffInDays(new GregorianCalendar(2004, 5, 1),
            new GregorianCalendar(2004, 5, 10)));
    }
}
