@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()); }