@Test public void testAddEmptyList() { driver.setStartTime(new EnduroTime("12.00.00")); driver.setStartTime(new EnduroTime("12.01.00")); driver.setFinishTime(new EnduroTime("13.00.00")); driver.setFinishTime(new EnduroTime("13.01.00")); ArrayList<EnduroTime> compare = driver.getStartTimes(); driver.setStartTimes(new ArrayList<EnduroTime>()); assertEquals(compare, driver.getStartTimes()); }
@Test public void testAddList() { driver.setStartTime(new EnduroTime("12.00.00")); driver.setStartTime(new EnduroTime("12.01.00")); driver.setFinishTime(new EnduroTime("13.00.00")); driver.setFinishTime(new EnduroTime("13.01.00")); ArrayList<EnduroTime> result = driver.getStartTimes(); result.add(new EnduroTime("00.00.00")); result.add(new EnduroTime("10.10.00")); ArrayList<EnduroTime> test = new ArrayList<EnduroTime>(); test.add(new EnduroTime("00.00.00")); test.add(new EnduroTime("10.10.00")); driver.setStartTimes(test); assertEquals(result, driver.getStartTimes()); }
@Test public void testPutTime() { driver.setStartTime(new EnduroTime("12.00.00")); assertEquals("12.00.00", driver.getStartTimes().get(0).toString()); assertEquals("12.00.00", driver.getStartTimeString()); }