Added Event class and junit test

- event class contains the time of specific event, related team/boat and even location eg. leg.

#implement #story[5]
This commit is contained in:
Haoming Yin
2017-03-07 20:30:23 +13:00
parent a3c1630e2e
commit 17fbb1212d
2 changed files with 98 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
package seng302;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Test for Event class
* Created by Haoming on 7/03/17.
*/
public class EventTest {
@Test
public void getTimeString() throws Exception {
Leg leg = new Leg(035, 100, "Start");
Boat boat = new Boat("testBoat");
Event event = new Event(1231242, boat, leg);
assertEquals("20:31:242", event.getTimeString());
}
}