Code example for Time

Methods: set

0
 
    @Test 
    public void shouldHaveSetTime() throws Exception { 
        Time t = new Time();
        t.setToNow();
        Time t2 = new Time();
        t2.set(t);
        assertEquals(t.timezone, t2.timezone);
        assertEquals(t.year, t2.year);
        assertEquals(t.month, t2.month);
        assertEquals(t.monthDay, t2.monthDay);
        assertEquals(t.hour, t2.hour);
        assertEquals(t.minute, t2.minute);
        assertEquals(t.second, t2.second);
    } 
 
    @Test 
    public void shouldHaveSet3Args() throws Exception { 
        Time t = new Time();
        t.set(1, 1, 2000);
        assertEquals(t.year, 2000);