added small improvements in GameTest
This commit is contained in:
parent
9d8e699c02
commit
4a955c2978
|
@ -29,6 +29,9 @@ class GameTest {
|
||||||
@DisplayName("Test correct Setup")
|
@DisplayName("Test correct Setup")
|
||||||
class Setup {
|
class Setup {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets up getting the Config, Game and Userinterface for the following tests.
|
||||||
|
*/
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
void setup() {
|
void setup() {
|
||||||
userInterface = new UserInterface("Test");
|
userInterface = new UserInterface("Test");
|
||||||
|
@ -139,6 +142,9 @@ class GameTest {
|
||||||
Assertions.assertEquals(new PositionVector(1, 0), game.getCarVelocity(0));
|
Assertions.assertEquals(new PositionVector(1, 0), game.getCarVelocity(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if car crash is set if a car crashes.
|
||||||
|
*/
|
||||||
@Test
|
@Test
|
||||||
void carCrash() {
|
void carCrash() {
|
||||||
game.doCarTurn(PositionVector.Direction.UP);
|
game.doCarTurn(PositionVector.Direction.UP);
|
||||||
|
@ -256,6 +262,7 @@ class GameTest {
|
||||||
this.directions = directions;
|
this.directions = directions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int selectOption(String text, List<String> options) {
|
public int selectOption(String text, List<String> options) {
|
||||||
pointerInstruction++;
|
pointerInstruction++;
|
||||||
|
@ -263,6 +270,7 @@ class GameTest {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void printInformation(String text) {
|
public void printInformation(String text) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue