mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-02-08 02:59:36 +01:00
Flytter tester som hadde havnet i feil klasse
This commit is contained in:
parent
8df3a8a9ab
commit
792fa9e7ec
@ -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
|
@Test
|
||||||
public void allTilesHaveUniqueId() {
|
public void allTilesHaveUniqueId() {
|
||||||
/* This test is also done implicitly by the allTileTypesIDConversionToIDAndBack test, but that test may fail
|
/* This test is also done implicitly by the allTileTypesIDConversionToIDAndBack test, but that test may fail
|
||||||
|
@ -6,6 +6,7 @@ import org.junit.Before;
|
|||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertNull;
|
||||||
|
|
||||||
public class TileTest {
|
public class TileTest {
|
||||||
private Tile tile;
|
private Tile tile;
|
||||||
@ -38,8 +39,13 @@ public class TileTest {
|
|||||||
assertEquals(Direction.SOUTH, tile2.getDirection());
|
assertEquals(Direction.SOUTH, tile2.getDirection());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void invalidTileTypeIDReturnsNull() {
|
||||||
|
assertNull(TileType.getTileTypeFromID(-1));
|
||||||
|
}
|
||||||
|
|
||||||
@Test (expected = IllegalArgumentException.class)
|
@Test (expected = IllegalArgumentException.class)
|
||||||
public void invalidTileThrowsException() {
|
public void invalidTileDirectionThrowsError() {
|
||||||
new Tile(TileType.CONVEYOR_BELT_FAST, Direction.NORTH_EAST);
|
new Tile(TileType.TILE, Direction.NORTH_EAST);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user