mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Reimplemented race position in the race view. Removed Boat class and Yacht class is replaced completely. Race position "-" shows properly on start screen. Removed BoatTest and TeamsParserTest. Fixed estimated time till finish on server.
#story[818]
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
package seng302;
|
||||
|
||||
import org.junit.Test;
|
||||
import seng302.models.Boat;
|
||||
import seng302.models.Event;
|
||||
import seng302.models.Yacht;
|
||||
import seng302.models.mark.SingleMark;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
@@ -15,14 +15,14 @@ public class EventTest {
|
||||
|
||||
@Test
|
||||
public void getTimeString() throws Exception {
|
||||
Boat boat = new Boat("testBoat");
|
||||
Yacht boat = new Yacht("testBoat");
|
||||
Event event = new Event(1231242.2, boat, new SingleMark("mark1"), new SingleMark("mark2"), 0);
|
||||
assertEquals("20:31:242", event.getTimeString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBoatHeading() throws Exception {
|
||||
Boat boat = new Boat("testBoat");
|
||||
Yacht boat = new Yacht("testBoat");
|
||||
Event event = new Event(1231242.2, boat, new SingleMark("mark1", 142.5, 122.1, 1), new SingleMark("mark2", 121.9,99.2, 2), 0);
|
||||
|
||||
assertEquals(event.getBoatHeading(), 228.0266137055349, 1e-15);
|
||||
@@ -30,7 +30,7 @@ public class EventTest {
|
||||
|
||||
@Test
|
||||
public void testDistanceBetweenMarks() throws Exception {
|
||||
Boat boat = new Boat("testBoat");
|
||||
Yacht boat = new Yacht("testBoat");
|
||||
Event event = new Event(1231242.2, boat, new SingleMark("mark1", 142.5, 122.1, 1), new SingleMark("mark2", 121.9,99.2, 2), 0);
|
||||
|
||||
assertEquals(event.getDistanceBetweenMarks(), 339059.653830461, 1e-15);
|
||||
|
||||
Reference in New Issue
Block a user