Browse Source

add more asserts

feat-serverGameRepresentation
Steffen Nitschke 4 years ago
parent
commit
227074de98
  1. 8
      fh.fd.ci.server/src/test/java/de/fd/fh/server/game/GameServiceTest.java

8
fh.fd.ci.server/src/test/java/de/fd/fh/server/game/GameServiceTest.java

@ -47,6 +47,14 @@ class GameServiceTest
assertNotNull(captor.getValue()); 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).should().save(any(Game.class));
then(repository).shouldHaveNoMoreInteractions(); then(repository).shouldHaveNoMoreInteractions();
} }
Loading…
Cancel
Save