Package org.joda.time

Examples of org.joda.time.LocalDate.plusWeeks()


    @Test
    public void testSetExpiringDate() {
        BaseCalendar calendar = createBasicCalendar();

        LocalDate currentDate = new LocalDate();
        calendar.newVersion(currentDate.plusWeeks(4));

        assertThat(calendar.getExpiringDate(currentDate), equalTo(currentDate
                .plusWeeks(4)));
        assertThat(calendar.getExpiringDate(currentDate.plusWeeks(4)),
                nullValue());
View Full Code Here


        BaseCalendar calendar = createBasicCalendar();

        LocalDate currentDate = new LocalDate();
        calendar.newVersion(currentDate.plusWeeks(4));

        assertThat(calendar.getExpiringDate(currentDate), equalTo(currentDate
                .plusWeeks(4)));
        assertThat(calendar.getExpiringDate(currentDate.plusWeeks(4)),
                nullValue());

        calendar.setExpiringDate(currentDate.plusWeeks(2), currentDate);
View Full Code Here

        LocalDate currentDate = new LocalDate();
        calendar.newVersion(currentDate.plusWeeks(4));

        assertThat(calendar.getExpiringDate(currentDate), equalTo(currentDate
                .plusWeeks(4)));
        assertThat(calendar.getExpiringDate(currentDate.plusWeeks(4)),
                nullValue());

        calendar.setExpiringDate(currentDate.plusWeeks(2), currentDate);

        assertThat(calendar.getExpiringDate(currentDate), equalTo(currentDate
View Full Code Here

        assertThat(calendar.getExpiringDate(currentDate), equalTo(currentDate
                .plusWeeks(4)));
        assertThat(calendar.getExpiringDate(currentDate.plusWeeks(4)),
                nullValue());

        calendar.setExpiringDate(currentDate.plusWeeks(2), currentDate);

        assertThat(calendar.getExpiringDate(currentDate), equalTo(currentDate
                .plusWeeks(2)));
        assertThat(calendar.getExpiringDate(currentDate.plusWeeks(4)),
                nullValue());
View Full Code Here

        assertThat(calendar.getExpiringDate(currentDate.plusWeeks(4)),
                nullValue());

        calendar.setExpiringDate(currentDate.plusWeeks(2), currentDate);

        assertThat(calendar.getExpiringDate(currentDate), equalTo(currentDate
                .plusWeeks(2)));
        assertThat(calendar.getExpiringDate(currentDate.plusWeeks(4)),
                nullValue());
    }
View Full Code Here

        calendar.setExpiringDate(currentDate.plusWeeks(2), currentDate);

        assertThat(calendar.getExpiringDate(currentDate), equalTo(currentDate
                .plusWeeks(2)));
        assertThat(calendar.getExpiringDate(currentDate.plusWeeks(4)),
                nullValue());
    }

    @Test
    public void testAllowNewVersionOnCurrentDate() {
View Full Code Here

    @Test
    public void testSetValidFrom() {
        BaseCalendar calendar = createBasicCalendar();

        LocalDate currentDate = new LocalDate();
        calendar.newVersion(currentDate.plusWeeks(4));

        assertThat(calendar.getValidFrom(currentDate), nullValue());
        assertThat(calendar.getValidFrom(currentDate.plusWeeks(4)),
                equalTo(currentDate.plusWeeks(4)));
View Full Code Here

        LocalDate currentDate = new LocalDate();
        calendar.newVersion(currentDate.plusWeeks(4));

        assertThat(calendar.getValidFrom(currentDate), nullValue());
        assertThat(calendar.getValidFrom(currentDate.plusWeeks(4)),
                equalTo(currentDate.plusWeeks(4)));

        calendar.setValidFrom(currentDate.plusWeeks(2), currentDate
                .plusWeeks(4));
View Full Code Here

        LocalDate currentDate = new LocalDate();
        calendar.newVersion(currentDate.plusWeeks(4));

        assertThat(calendar.getValidFrom(currentDate), nullValue());
        assertThat(calendar.getValidFrom(currentDate.plusWeeks(4)),
                equalTo(currentDate.plusWeeks(4)));

        calendar.setValidFrom(currentDate.plusWeeks(2), currentDate
                .plusWeeks(4));

        assertThat(calendar.getValidFrom(currentDate), nullValue());
View Full Code Here

        assertThat(calendar.getValidFrom(currentDate), nullValue());
        assertThat(calendar.getValidFrom(currentDate.plusWeeks(4)),
                equalTo(currentDate.plusWeeks(4)));

        calendar.setValidFrom(currentDate.plusWeeks(2), currentDate
                .plusWeeks(4));

        assertThat(calendar.getValidFrom(currentDate), nullValue());
        assertThat(calendar.getValidFrom(currentDate.plusWeeks(4)),
                equalTo(currentDate.plusWeeks(2)));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.