mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-06-28 20:24:43 +02:00
Merge branch 'master' of https://github.com/inf112-v20/Fiasko
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
package inf112.fiasko.roborally;
|
||||
package inf112.fiasko.roborally.element_properties;
|
||||
|
||||
import inf112.fiasko.roborally.element_properties.Direction;
|
||||
import org.junit.Test;
|
@ -1,4 +1,4 @@
|
||||
package inf112.fiasko.roborally;
|
||||
package inf112.fiasko.roborally.element_properties;
|
||||
|
||||
import inf112.fiasko.roborally.element_properties.Position;
|
||||
import org.junit.Before;
|
@ -1,4 +1,4 @@
|
||||
package inf112.fiasko.roborally;
|
||||
package inf112.fiasko.roborally.element_properties;
|
||||
|
||||
import inf112.fiasko.roborally.element_properties.TileType;
|
||||
import org.junit.Test;
|
@ -1,4 +1,4 @@
|
||||
package inf112.fiasko.roborally;
|
||||
package inf112.fiasko.roborally.element_properties;
|
||||
|
||||
import inf112.fiasko.roborally.element_properties.TileType;
|
||||
import inf112.fiasko.roborally.element_properties.WallType;
|
@ -1,4 +1,4 @@
|
||||
package inf112.fiasko.roborally;
|
||||
package inf112.fiasko.roborally.game;
|
||||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
@ -1,4 +1,4 @@
|
||||
package inf112.fiasko.roborally;
|
||||
package inf112.fiasko.roborally.objects;
|
||||
|
||||
import inf112.fiasko.roborally.objects.DrawableObject;
|
||||
import inf112.fiasko.roborally.element_properties.GameTexture;
|
22
src/test/java/inf112/fiasko/roborally/objects/RobotTest.java
Normal file
22
src/test/java/inf112/fiasko/roborally/objects/RobotTest.java
Normal file
@ -0,0 +1,22 @@
|
||||
package inf112.fiasko.roborally.objects;
|
||||
|
||||
import inf112.fiasko.roborally.element_properties.Position;
|
||||
import inf112.fiasko.roborally.objects.Robot;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import org.junit.Test;
|
||||
|
||||
public class RobotTest {
|
||||
@Test
|
||||
public void testRobotGetDamageOnInitializedRobot(){
|
||||
Position robotPosition = new Position(3,6);
|
||||
Robot testRobotGetDamage = new Robot(6, robotPosition);
|
||||
assertEquals(0, testRobotGetDamage.getDamage());
|
||||
}
|
||||
@Test
|
||||
public void testRobotSetDamage(){
|
||||
Position robotPosition = new Position(3,6);
|
||||
Robot testRobotSetDamage = new Robot(6, robotPosition);
|
||||
testRobotSetDamage.setDamage(2);
|
||||
assertEquals(2, testRobotSetDamage.getDamage());
|
||||
}
|
||||
}
|
@ -1,8 +1,7 @@
|
||||
package inf112.fiasko.roborally;
|
||||
package inf112.fiasko.roborally.objects;
|
||||
|
||||
import inf112.fiasko.roborally.element_properties.Direction;
|
||||
import inf112.fiasko.roborally.element_properties.TileType;
|
||||
import inf112.fiasko.roborally.objects.Tile;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
@ -38,4 +37,9 @@ public class TileTest {
|
||||
public void getDirectionFromTile2() {
|
||||
assertEquals(Direction.SOUTH, tile2.getDirection());
|
||||
}
|
||||
|
||||
@Test (expected = IllegalArgumentException.class)
|
||||
public void invalidTileThrowsException() {
|
||||
new Tile(TileType.TRANSPORT_BAND_FAST, Direction.NORTH_EAST);
|
||||
}
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
package inf112.fiasko.roborally;
|
||||
package inf112.fiasko.roborally.objects;
|
||||
|
||||
import inf112.fiasko.roborally.element_properties.Direction;
|
||||
import inf112.fiasko.roborally.element_properties.Wall;
|
||||
import inf112.fiasko.roborally.objects.Wall;
|
||||
import inf112.fiasko.roborally.element_properties.WallType;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import org.junit.Test;
|
||||
|
||||
public class TestWall {
|
||||
public class WallTest {
|
||||
@Test
|
||||
public void testWallGetWallTypeNormal(){
|
||||
Wall testGetWall = new Wall(WallType.WALL_NORMAL, Direction.NORTH);
|
Reference in New Issue
Block a user