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:
Zhi You Tan
2017-05-04 13:50:06 +12:00
parent a4cc5f222c
commit 6935bd514e
19 changed files with 448 additions and 363 deletions
+4 -4
View File
@@ -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);