@Test public void compareDriverWithoutTotalTimeToOneWithTotalTime() { MarathonDriver driver2 = new MarathonDriver(2); MarathonDriver driver3 = new MarathonDriver(3); driver3.setStartTime(new EnduroTime("12.00.00")); driver3.setFinishTime(new EnduroTime("12.15.13")); assertEquals(-1, driver3.compareTo(driver2)); }
@Test public void testComparable() { MarathonDriver driver2 = new MarathonDriver(2); driver.setStartTime(new EnduroTime("12.00.00")); driver.setFinishTime(new EnduroTime("13.00.00")); driver2.setStartTime(new EnduroTime("12.00.00")); driver2.setFinishTime(new EnduroTime("12.30.00")); assertTrue(driver.compareTo(driver2) > 0); }