Package org.apache.isis.applib.value

Examples of org.apache.isis.applib.value.Date


        assertEquals(new Date(2001, 1, 14), parsed);
    }

    @Test
    public void testParseEntryOfWeeksBeforeToToday() throws Exception {
        final Date parsed = adapter.parseTextEntry(null, "-4w", null);
        assertEquals(new Date(2003, 7, 20), parsed);
    }
View Full Code Here


        assertEquals(new Date(2003, 7, 20), parsed);
    }

    @Test
    public void testParseEntryOfMonthsAfterDate() throws Exception {
        final Date parsed = adapter.parseTextEntry(date, "+3m", null);
        assertEquals(new Date(2001, 5, 4), parsed);
    }
View Full Code Here

        assertEquals(new Date(2001, 5, 4), parsed);
    }

    @Test
    public void testParseEntryOfMonthsAfterToToday() throws Exception {
        final Date parsed = adapter.parseTextEntry(null, "+4m", null);
        assertEquals(new Date(2003, 12, 17), parsed);
    }
View Full Code Here

        assertEquals(new Date(2003, 12, 17), parsed);
    }

    @Test
    public void testParseEntryOfMonthsBeforeDate() throws Exception {
        final Date parsed = adapter.parseTextEntry(date, "-3m", null);
        assertEquals(new Date(2000, 11, 4), parsed);
    }
View Full Code Here

        assertEquals(new Date(2000, 11, 4), parsed);
    }

    @Test
    public void testParseEntryOfMonthsBeforeToToday() throws Exception {
        final Date parsed = adapter.parseTextEntry(null, "-4m", null);
        assertEquals(new Date(2003, 4, 17), parsed);
    }
View Full Code Here

                will(returnValue(null));
            }
        });

        TestClock.initialize();
        date = new Date(2001, 2, 4);
        holder = new FacetHolderImpl();
        setValue(adapter = new DateValueSemanticsProvider(holder, mockConfiguration, mockContext));
    }
View Full Code Here

        assertEquals("20010204", adapter.toEncodedString(date));
    }

    @Test
    public void testParseEntryOfDaysAfterDate() throws Exception {
        final Date parsed = adapter.parseTextEntry(date, "+7", null);
        assertEquals(new Date(2001, 2, 11), parsed);
    }
View Full Code Here

        assertEquals(new Date(2001, 2, 11), parsed);
    }

    @Test
    public void testParseEntryOfDaysAfterToToday() throws Exception {
        final Date parsed = adapter.parseTextEntry(null, "+5", null);
        assertEquals(new Date(2003, 8, 22), parsed);
    }
View Full Code Here

        assertEquals(new Date(2003, 8, 22), parsed);
    }

    @Test
    public void testParseEntryOfDaysBeforeDate() throws Exception {
        final Date parsed = adapter.parseTextEntry(date, "-7", null);
        assertEquals(new Date(2001, 1, 28), parsed);
    }
View Full Code Here

        assertEquals(new Date(2001, 1, 28), parsed);
    }

    @Test
    public void testParseEntryOfDaysBeforeToToday() throws Exception {
        final Date parsed = adapter.parseTextEntry(null, "-5", null);
        assertEquals(new Date(2003, 8, 12), parsed);
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.applib.value.Date

Copyright © 2018 www.massapicom. 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.