|
|
@ -179,5 +179,22 @@ class ServerAppTest |
|
|
|
assertNotNull(res); |
|
|
|
assertEquals(200, res.getStatus()); |
|
|
|
then(gameController).should().createGame(any(), any()); |
|
|
|
then(gameController).shouldHaveNoMoreInteractions(); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void testFindGameById() throws JsonProcessingException |
|
|
|
{ |
|
|
|
when(gameController.findGameById(any(), any())).thenReturn(mock(Response.class)); |
|
|
|
|
|
|
|
final String url = "/games/12345"; |
|
|
|
|
|
|
|
ApiTestUtils.TestResponse<String> res = new ApiTestUtils<String>() |
|
|
|
.request("GET", url, null, null, String.class); |
|
|
|
|
|
|
|
assertNotNull(res); |
|
|
|
assertEquals(200, res.getStatus()); |
|
|
|
then(gameController).should().findGameById(any(), any()); |
|
|
|
then(gameController).shouldHaveNoMoreInteractions(); |
|
|
|
} |
|
|
|
} |