mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
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:
@@ -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());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user