This commit is contained in:
Petter Tobias Madsen 2020-02-20 11:19:46 +01:00
commit f3120d1047

View File

@ -0,0 +1,41 @@
package inf112.fiasko.roborally;
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;
import static org.junit.Assert.*;
public class TileTest {
private Tile tile;
private Tile tile2;
@Before
public void setUp() {
tile = new Tile(TileType.HOLE, Direction.NORTH);
tile2 = new Tile(TileType.COGWHEEL_RIGHT, Direction.SOUTH);
}
@Test
public void getTileTypeFromTile() {
assertEquals(TileType.HOLE, tile.getTileType());
}
@Test
public void getTileTypeFromTile2() {
assertEquals(TileType.COGWHEEL_RIGHT, tile2.getTileType());
}
@Test
public void getDirectionFromTile() {
assertEquals(Direction.NORTH, tile.getDirection());
}
@Test
public void getDirectionFromTile2() {
assertEquals(Direction.SOUTH, tile2.getDirection());
}
}