diff --git a/src/main/java/inf112/fiasko/roborally/element_properties/Wall.java b/src/main/java/inf112/fiasko/roborally/element_properties/Wall.java new file mode 100644 index 0000000..a6d27a9 --- /dev/null +++ b/src/main/java/inf112/fiasko/roborally/element_properties/Wall.java @@ -0,0 +1,23 @@ +package inf112.fiasko.roborally.element_properties; + +public class Wall { + private WallType wall; + private Direction direction; + + public Wall (WallType wall,Direction direction){ + this.wall = wall; + this.direction = direction; + } + + public WallType getWallType() { + return wall; + } + + public Direction getDirection(){ + return direction; + } + + + + +} diff --git a/src/test/java/inf112/fiasko/roborally/TestWall.java b/src/test/java/inf112/fiasko/roborally/TestWall.java new file mode 100644 index 0000000..837e44e --- /dev/null +++ b/src/test/java/inf112/fiasko/roborally/TestWall.java @@ -0,0 +1,31 @@ +package inf112.fiasko.roborally; + +import inf112.fiasko.roborally.element_properties.Direction; +import inf112.fiasko.roborally.element_properties.Wall; +import inf112.fiasko.roborally.element_properties.WallType; +import static org.junit.Assert.assertEquals; +import org.junit.Test; + +public class TestWall { + @Test + public void testWallGetWallTypeNormal(){ + Wall testGetWall = new Wall(WallType.WALL_NORMAL, Direction.NORTH); + assertEquals(WallType.WALL_NORMAL, testGetWall.getWallType()); + } + @Test + public void testWallGetWallTypeCorner(){ + Wall testGetWall = new Wall(WallType.WALL_CORNER, Direction.NORTH); + assertEquals(WallType.WALL_CORNER, testGetWall.getWallType()); + } + @Test + public void testWallGetDirectionNorth(){ + Wall testGetWall = new Wall(WallType.WALL_CORNER, Direction.NORTH); + assertEquals(Direction.NORTH, testGetWall.getDirection()); + } + @Test + public void testWallGetDirectionEast(){ + Wall testGetWall = new Wall(WallType.WALL_CORNER, Direction.EAST); + assertEquals(Direction.EAST, testGetWall.getDirection()); + } + +}