Flytter tester som hadde havnet i feil klasse

This commit is contained in:
Kristian Knarvik 2020-03-23 12:25:57 +01:00
parent 8df3a8a9ab
commit 792fa9e7ec
2 changed files with 8 additions and 12 deletions

View File

@ -40,16 +40,6 @@ public class TileTypeTest {
}
}
@Test
public void invalidTileTypeIDReturnsNull() {
assertNull(TileType.getTileTypeFromID(-1));
}
@Test (expected = IllegalArgumentException.class)
public void invalidTileDirectionThrowsError() {
new Tile(TileType.TILE, Direction.NORTH_EAST);
}
@Test
public void allTilesHaveUniqueId() {
/* This test is also done implicitly by the allTileTypesIDConversionToIDAndBack test, but that test may fail

View File

@ -6,6 +6,7 @@ import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
public class TileTest {
private Tile tile;
@ -38,8 +39,13 @@ public class TileTest {
assertEquals(Direction.SOUTH, tile2.getDirection());
}
@Test
public void invalidTileTypeIDReturnsNull() {
assertNull(TileType.getTileTypeFromID(-1));
}
@Test (expected = IllegalArgumentException.class)
public void invalidTileThrowsException() {
new Tile(TileType.CONVEYOR_BELT_FAST, Direction.NORTH_EAST);
public void invalidTileDirectionThrowsError() {
new Tile(TileType.TILE, Direction.NORTH_EAST);
}
}