Package org.apache.isis.applib.value

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


    // }}

    // {{ Lifecycle
    public void created() {
        status = "New";
        date = new Date();
    }
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

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

    @Test
    public void testParseEntryOfKeywordToday() throws Exception {
        final Date parsed = adapter.parseTextEntry(date, "today", null);
        assertEquals(new Date(2003, 8, 17), parsed);
    }
View Full Code Here

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

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

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

    @Test
    public void testParseEntryOfWeeksAfterToToday() throws Exception {
        final Date parsed = adapter.parseTextEntry(null, "+4w", null);
        assertEquals(new Date(2003, 9, 14), parsed);
    }
View Full Code Here

        assertEquals(new Date(2003, 9, 14), parsed);
    }

    @Test
    public void testParseEntryOfWeeksBeforeDate() throws Exception {
        final Date parsed = adapter.parseTextEntry(date, "-3w", null);
        assertEquals(new Date(2001, 1, 14), 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.