mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
Changed the boatType attribute from all around the place from String lit to enum
#story[1274]
This commit is contained in:
@@ -5,6 +5,7 @@ import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import seng302.gameServer.GameState;
|
||||
import seng302.utilities.GeoUtility;
|
||||
import seng302.visualiser.fxObjects.assets_3D.BoatMeshType;
|
||||
|
||||
import static seng302.gameServer.GameState.checkCollision;
|
||||
|
||||
@@ -14,8 +15,10 @@ import static seng302.gameServer.GameState.checkCollision;
|
||||
*/
|
||||
public class UpdateYachtTest {
|
||||
|
||||
private ServerYacht yacht1 = new ServerYacht("Yacht", 1, "1", "Yacht" + 1, "Yacht" + 1, "Test1");
|
||||
private ServerYacht yacht2 = new ServerYacht("Yacht", 2, "2", "Yacht" + 2, "Yacht" + 2, "Test2");
|
||||
private ServerYacht yacht1 = new ServerYacht(BoatMeshType.DINGHY, 1, "1", "Yacht" + 1,
|
||||
"Yacht" + 1, "Test1");
|
||||
private ServerYacht yacht2 = new ServerYacht(BoatMeshType.DINGHY, 2, "2", "Yacht" + 2,
|
||||
"Yacht" + 2, "Test2");
|
||||
private GeoPoint geoPoint1 = new GeoPoint(50.0, 50.0);
|
||||
private GeoPoint geoPoint2 = GeoUtility.getGeoCoordinate(geoPoint1, 90.0, 50.0);
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
import seng302.gameServer.GameState;
|
||||
import seng302.model.ServerYacht;
|
||||
import seng302.visualiser.fxObjects.assets_3D.BoatMeshType;
|
||||
|
||||
|
||||
public class YachtTest {
|
||||
@@ -17,7 +18,7 @@ public class YachtTest {
|
||||
@BeforeClass
|
||||
public static void setUp() {
|
||||
new GameState("localhost");
|
||||
y1 = new ServerYacht("Yacht", 1, "Y1", "Y1", "Yacht 1", "C1");
|
||||
y1 = new ServerYacht(BoatMeshType.DINGHY, 1, "Y1", "Y1", "Yacht 1", "C1");
|
||||
gs = new GameState("localhost");
|
||||
}
|
||||
|
||||
|
||||
@@ -25,11 +25,4 @@ public class BoatMeshTypeTest {
|
||||
Assert.assertEquals(BoatMeshType.DINGHY, prevBoat);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetBoatMeshType() {
|
||||
BoatMeshType currentBoat = BoatMeshType.getBoatMeshType("DINGHY");
|
||||
Assert.assertEquals(BoatMeshType.DINGHY, currentBoat);
|
||||
BoatMeshType wrongBoat = BoatMeshType.getBoatMeshType("NOT A REAL BOAT");
|
||||
Assert.assertEquals(BoatMeshType.DINGHY, wrongBoat);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import static org.junit.Assert.assertTrue;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import seng302.model.ClientYacht;
|
||||
import seng302.visualiser.fxObjects.assets_3D.BoatMeshType;
|
||||
|
||||
/**
|
||||
* Created by kre39 on 6/08/17.
|
||||
@@ -16,7 +17,7 @@ public class BoatSailAnimationToggleTest {
|
||||
|
||||
@Before
|
||||
public void setup() throws Exception{
|
||||
yacht = new ClientYacht("Yacht", 1, "YACHT", "YAC", "Test Yacht", "NZ");
|
||||
yacht = new ClientYacht(BoatMeshType.DINGHY, 1, "YACHT", "YAC", "Test Yacht", "NZ");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user