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