Code example for Time

Methods: parse

0
        assertEquals(0, t.second);
    } 
 
    @Test(expected = TimeFormatException.class) 
    public void shouldThrowTimeFormatException() throws Exception { 
        Time t = new Time();
        t.parse("BLARGH");
    } 
 
    @Test 
    public void shouldHaveParseShort() throws Exception { 
        Time t = new Time();
        t.parse("20081013");
        assertEquals(2008, t.year);
        assertEquals(9, t.month);
        assertEquals(13, t.monthDay);
        assertEquals(0, t.hour);
        assertEquals(0, t.minute);
        assertEquals(0, t.second);
    } 
Stop searching for code, let great code find you!  Add Codota to your java IDE