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,35 +1,35 @@
|
||||
package seng302;
|
||||
|
||||
import org.junit.Test;
|
||||
import seng302.models.Boat;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
/**
|
||||
* Unit test for the Team class.
|
||||
*/
|
||||
public class BoatTest {
|
||||
|
||||
@Test
|
||||
public void testBoatCreation() {
|
||||
Boat boat1 = new Boat("Team 1");
|
||||
assertEquals(boat1.getTeamName(), "Team 1");
|
||||
assertEquals(boat1.getVelocity(), (double) 10.0, 1e-15);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testChangeTeamName() {
|
||||
Boat boat1 = new Boat("Team 1");
|
||||
boat1.setTeamName("Team 2");
|
||||
assertEquals(boat1.getTeamName(), "Team 2");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSetVelocity() {
|
||||
Boat boat1 = new Boat("Team 1", 29.0, "", 100);
|
||||
assertEquals(boat1.getVelocity(), (double) 29.0, 1e-15);
|
||||
|
||||
boat1.setVelocity(12.0);
|
||||
assertEquals(boat1.getVelocity(), (double)12.0, 1e-15);
|
||||
}
|
||||
}
|
||||
//package seng302;
|
||||
//
|
||||
//import org.junit.Test;
|
||||
//import seng302.models.Boat;
|
||||
//
|
||||
//import static org.junit.Assert.assertEquals;
|
||||
//
|
||||
///**
|
||||
// * Unit test for the Team class.
|
||||
// */
|
||||
//public class BoatTest {
|
||||
//
|
||||
// @Test
|
||||
// public void testBoatCreation() {
|
||||
// Boat boat1 = new Boat("Team 1");
|
||||
// assertEquals(boat1.getTeamName(), "Team 1");
|
||||
// assertEquals(boat1.getVelocity(), (double) 10.0, 1e-15);
|
||||
// }
|
||||
//
|
||||
// @Test
|
||||
// public void testChangeTeamName() {
|
||||
// Boat boat1 = new Boat("Team 1");
|
||||
// boat1.setTeamName("Team 2");
|
||||
// assertEquals(boat1.getTeamName(), "Team 2");
|
||||
// }
|
||||
//
|
||||
// @Test
|
||||
// public void testSetVelocity() {
|
||||
// Boat boat1 = new Boat("Team 1", 29.0, "", 100);
|
||||
// assertEquals(boat1.getVelocity(), (double) 29.0, 1e-15);
|
||||
//
|
||||
// boat1.setVelocity(12.0);
|
||||
// assertEquals(boat1.getVelocity(), (double)12.0, 1e-15);
|
||||
// }
|
||||
//}
|
||||
|
||||
Reference in New Issue
Block a user