diff --git a/src/test/java/inf112/fiasko/roborally/element_properties/PositionTest.java b/src/test/java/inf112/fiasko/roborally/element_properties/PositionTest.java index 2b3204f..eb1c93b 100644 --- a/src/test/java/inf112/fiasko/roborally/element_properties/PositionTest.java +++ b/src/test/java/inf112/fiasko/roborally/element_properties/PositionTest.java @@ -24,12 +24,12 @@ public class PositionTest { testPosition6 = new Position(3, 3); } @Test - public void testGetXPosition(){ + public void testGetXPosition() { assertEquals(3,testPosition1.getXCoordinate()); } @Test - public void testGetYPosition(){ + public void testGetYPosition() { assertEquals(4,testPosition1.getYCoordinate()); } diff --git a/src/test/java/inf112/fiasko/roborally/objects/BoardTest.java b/src/test/java/inf112/fiasko/roborally/objects/BoardTest.java index 7d4562f..21d6668 100644 --- a/src/test/java/inf112/fiasko/roborally/objects/BoardTest.java +++ b/src/test/java/inf112/fiasko/roborally/objects/BoardTest.java @@ -139,14 +139,14 @@ public class BoardTest { } @Test - public void setRobotPowerDownStatus(){ + public void setRobotPowerDownStatus() { Robot testrobot = robotListforpowerdown.get(0); assertEquals(false , testrobot.isInPowerDown()); boardforpowerdown.setPowerDown(RobotID.ROBOT_1,true); assertEquals(true , testrobot.isInPowerDown()); } @Test - public void executRobotPowerDown(){ + public void executRobotPowerDown() { Robot testrobot = robotListforpowerdown.get(1); boardforpowerdown.setPowerDown(RobotID.ROBOT_2,true); testrobot.setDamageTaken(4); @@ -155,7 +155,7 @@ public class BoardTest { assertEquals(0,testrobot.getDamageTaken()); } @Test - public void repairRobotOnRepairTile(){ + public void repairRobotOnRepairTile() { Robot testrobot = robotListforpowerdown.get(2); testrobot.setDamageTaken(4); assertEquals(4,testrobot.getDamageTaken()); @@ -164,21 +164,21 @@ public class BoardTest { } @Test - public void robotHitByLaserGetsDamaged(){ + public void robotHitByLaserGetsDamaged() { Robot testRobot = robotListforlaser.get(7); assertEquals(0, testRobot.getDamageTaken()); boardforlaser.fireAllLasers(); assertNotEquals(0,testRobot.getDamageTaken()); } @Test - public void laserBlockedByWallDoesNotDamageRobot(){ + public void laserBlockedByWallDoesNotDamageRobot() { Robot testRobot = robotListforlaser.get(0); assertEquals(0, testRobot.getDamageTaken()); boardforlaser.fireAllLasers(); assertEquals(0,testRobot.getDamageTaken()); } @Test - public void laserBlockedByRobotDoesNotDamageOtherRobot(){ + public void laserBlockedByRobotDoesNotDamageOtherRobot() { Robot testRobot1 = robotListforlaser.get(1); Robot testRobot2 = robotListforlaser.get(2); testRobot2.setFacingDirection(Direction.EAST); @@ -189,14 +189,14 @@ public class BoardTest { assertNotEquals(0,testRobot2.getDamageTaken()); } @Test - public void doubleLaserDamage(){ + public void doubleLaserDamage() { Robot testRobot = robotListforlaser.get(6); assertEquals(0, testRobot.getDamageTaken()); boardforlaser.fireAllLasers(); assertEquals(2,testRobot.getDamageTaken()); } @Test - public void robotGetsHitByTwoLasers(){ + public void robotGetsHitByTwoLasers() { Robot testRobot = robotListforlaser.get(3); assertEquals(0, testRobot.getDamageTaken()); boardforlaser.fireAllLasers(); @@ -397,12 +397,12 @@ public class BoardTest { assertTrue(tileTypeList.containsAll(tileTypeListResult) && tileTypeListResult.containsAll(tileTypeList)); } - public boolean checkIfAllElementsAreOfSpecificWallType(List> elemList, K WallType) { + private boolean checkIfAllElementsAreOfSpecificWallType(List> elemList, K WallType) { Predicate> pred = (element) -> element.getElement().getWallType() == WallType; elemList.removeIf(pred); return 0 == elemList.size(); } - public boolean checkIfAllElementsAreOfSpecificTileType(List> elemList, K TileType) { + private boolean checkIfAllElementsAreOfSpecificTileType(List> elemList, K TileType) { Predicate> pred = (element) -> element.getElement().getTileType() == TileType; elemList.removeIf(pred); return 0 == elemList.size(); diff --git a/src/test/java/inf112/fiasko/roborally/objects/RobotTest.java b/src/test/java/inf112/fiasko/roborally/objects/RobotTest.java index 51db52d..1e0e900 100644 --- a/src/test/java/inf112/fiasko/roborally/objects/RobotTest.java +++ b/src/test/java/inf112/fiasko/roborally/objects/RobotTest.java @@ -19,17 +19,17 @@ public class RobotTest { } @Test - public void testRobotGetDamageOnInitializedRobot(){ + public void testRobotGetDamageOnInitializedRobot() { assertEquals(0, testRobot.getDamageTaken()); } @Test - public void testRobotGetPlayerId(){ + public void testRobotGetPlayerId() { assertEquals(RobotID.ROBOT_6, testRobot.getRobotId()); } @Test - public void testRobotGetBackupOnInitializedRobot(){ + public void testRobotGetBackupOnInitializedRobot() { assertEquals(robotPosition, testRobot.getBackupPosition()); } @@ -40,7 +40,7 @@ public class RobotTest { } @Test - public void testRobotGetPositionOnInitializedRobot(){ + public void testRobotGetPositionOnInitializedRobot() { assertEquals(robotPosition, testRobot.getPosition()); } @@ -52,7 +52,7 @@ public class RobotTest { } @Test - public void testRobotIsInPowerDownOnInitializedRobot(){ + public void testRobotIsInPowerDownOnInitializedRobot() { assertEquals(false, testRobot.isInPowerDown()); } diff --git a/src/test/java/inf112/fiasko/roborally/objects/WallTest.java b/src/test/java/inf112/fiasko/roborally/objects/WallTest.java index 89db7c9..dd46de2 100644 --- a/src/test/java/inf112/fiasko/roborally/objects/WallTest.java +++ b/src/test/java/inf112/fiasko/roborally/objects/WallTest.java @@ -7,27 +7,27 @@ import org.junit.Test; public class WallTest { @Test - public void testWallGetWallTypeNormal(){ + public void testWallGetWallTypeNormal() { Wall testGetWall = new Wall(WallType.WALL_NORMAL, Direction.NORTH); assertEquals(WallType.WALL_NORMAL, testGetWall.getWallType()); } @Test - public void testWallGetWallTypeCorner(){ + public void testWallGetWallTypeCorner() { Wall testGetWall = new Wall(WallType.WALL_CORNER, Direction.NORTH); assertEquals(WallType.WALL_CORNER, testGetWall.getWallType()); } @Test - public void testWallGetWallTypeLaserSingle(){ + public void testWallGetWallTypeLaserSingle() { Wall testGetWall = new Wall(WallType.WALL_LASER_SINGLE, Direction.NORTH); assertEquals(WallType.WALL_LASER_SINGLE, testGetWall.getWallType()); } @Test - public void testWallGetDirectionNorth(){ + public void testWallGetDirectionNorth() { Wall testGetWall = new Wall(WallType.WALL_CORNER, Direction.NORTH); assertEquals(Direction.NORTH, testGetWall.getDirection()); } @Test - public void testWallGetDirectionEast(){ + public void testWallGetDirectionEast() { Wall testGetWall = new Wall(WallType.WALL_CORNER, Direction.EAST); assertEquals(Direction.EAST, testGetWall.getDirection()); }