|
@ -74,9 +74,10 @@ class LogicTest { |
|
|
int size = 4; |
|
|
int size = 4; |
|
|
matchfield = new Matchfield(size); |
|
|
matchfield = new Matchfield(size); |
|
|
matchfield.createMatchfield(); |
|
|
matchfield.createMatchfield(); |
|
|
|
|
|
logic.setMatchfield(matchfield); |
|
|
|
|
|
|
|
|
Coordinate expectedResult = new Coordinate(2, 2); |
|
|
Coordinate expectedResult = new Coordinate(2, 2); |
|
|
logic.setLastShot(expectedResult, matchfield); |
|
|
|
|
|
|
|
|
logic.setLastShot(expectedResult); |
|
|
Coordinate result = logic.getLastShot(); |
|
|
Coordinate result = logic.getLastShot(); |
|
|
|
|
|
|
|
|
assertEquals(result, expectedResult); |
|
|
assertEquals(result, expectedResult); |
|
@ -96,7 +97,6 @@ class LogicTest { |
|
|
logic.setMatchfield(matchfield); |
|
|
logic.setMatchfield(matchfield); |
|
|
result = logic.getMatchfield(); |
|
|
result = logic.getMatchfield(); |
|
|
assertNotNull(result); |
|
|
assertNotNull(result); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |