|
|
@ -14,7 +14,7 @@ class GameServiceTest |
|
|
|
void testCreateGame() |
|
|
|
{ |
|
|
|
final GameRepository repository = when(mock(GameRepository.class).save(any())) |
|
|
|
.thenReturn(new Key<>(Game.class, "testCollection", GameId.random())) |
|
|
|
.thenReturn(new Key<>(Game.class, "testCollection", GameId.of("98765"))) |
|
|
|
.getMock(); |
|
|
|
|
|
|
|
final Game game = new Game(); |
|
|
@ -22,5 +22,6 @@ class GameServiceTest |
|
|
|
final GameId result = new GameService(repository).createGame(game); |
|
|
|
|
|
|
|
assertNotNull(result); |
|
|
|
assertEquals("98765", result.getIdentifier()); |
|
|
|
} |
|
|
|
} |