Legger til manglende mellomrom mellom paranteser og krøllparanteser

This commit is contained in:
Kristian Knarvik 2020-04-07 15:16:23 +02:00
parent 17d6495e67
commit 1c47b627af
4 changed files with 22 additions and 22 deletions

View File

@ -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());
}

View File

@ -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 <K> boolean checkIfAllElementsAreOfSpecificWallType(List<BoardElementContainer<Wall>> elemList, K WallType) {
private <K> boolean checkIfAllElementsAreOfSpecificWallType(List<BoardElementContainer<Wall>> elemList, K WallType) {
Predicate<BoardElementContainer<Wall>> pred = (element) -> element.getElement().getWallType() == WallType;
elemList.removeIf(pred);
return 0 == elemList.size();
}
public <K> boolean checkIfAllElementsAreOfSpecificTileType(List<BoardElementContainer<Tile>> elemList, K TileType) {
private <K> boolean checkIfAllElementsAreOfSpecificTileType(List<BoardElementContainer<Tile>> elemList, K TileType) {
Predicate<BoardElementContainer<Tile>> pred = (element) -> element.getElement().getTileType() == TileType;
elemList.removeIf(pred);
return 0 == elemList.size();

View File

@ -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());
}

View File

@ -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());
}