From 227074de9867b0e748adc76fd4e4a954ea425edd Mon Sep 17 00:00:00 2001 From: Steffen Nitschke Date: Wed, 3 Feb 2021 13:26:35 +0100 Subject: [PATCH] add more asserts --- .../test/java/de/fd/fh/server/game/GameServiceTest.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fh.fd.ci.server/src/test/java/de/fd/fh/server/game/GameServiceTest.java b/fh.fd.ci.server/src/test/java/de/fd/fh/server/game/GameServiceTest.java index c1a52c6..af0f889 100644 --- a/fh.fd.ci.server/src/test/java/de/fd/fh/server/game/GameServiceTest.java +++ b/fh.fd.ci.server/src/test/java/de/fd/fh/server/game/GameServiceTest.java @@ -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(); }