|
|
@ -66,4 +66,21 @@ class LogicTest { |
|
|
|
|
|
|
|
assertEquals(everySecondField, expectedResult); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void testGetAndSetLastShot() { |
|
|
|
Logic logic = new Logic(); |
|
|
|
Matchfield matchfield; |
|
|
|
int size = 4; |
|
|
|
matchfield = new Matchfield(size); |
|
|
|
matchfield.createMatchfield(); |
|
|
|
|
|
|
|
Coordinate expectedResult = new Coordinate(2, 2); |
|
|
|
logic.setLastShot(expectedResult, matchfield); |
|
|
|
Coordinate result = logic.getLastShot(); |
|
|
|
|
|
|
|
assertEquals(result, expectedResult); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |