|
|
@ -47,6 +47,14 @@ class GameServiceTest |
|
|
|
|
|
|
|
assertNotNull(captor.getValue()); |
|
|
|
|
|
|
|
final Game savedGame = captor.getValue(); |
|
|
|
|
|
|
|
assertNotNull(savedGame.getId()); |
|
|
|
assertEquals("12345", savedGame.getBlackPlayer().getIdentifier()); |
|
|
|
assertEquals("98765", savedGame.getWhitePlayer().getIdentifier()); |
|
|
|
assertEquals("98765", savedGame.getCurrentPlayer().getIdentifier()); |
|
|
|
assertEquals(64, savedGame.getFields().size()); |
|
|
|
|
|
|
|
then(repository).should().save(any(Game.class)); |
|
|
|
then(repository).shouldHaveNoMoreInteractions(); |
|
|
|
} |