Skip to content
Snippets Groups Projects
Commit 26a0e9c3 authored by Jan Zickermann's avatar Jan Zickermann
Browse files

OZG-4815 OZG-4832 Verify RootModelAssembler called

parent 8ff66a10
No related branches found
No related tags found
No related merge requests found
...@@ -32,7 +32,7 @@ import lombok.RequiredArgsConstructor; ...@@ -32,7 +32,7 @@ import lombok.RequiredArgsConstructor;
@Component @Component
@RequiredArgsConstructor @RequiredArgsConstructor
public class RootModelAssembler implements RepresentationModelAssembler<Root, EntityModel<Root>> { class RootModelAssembler implements RepresentationModelAssembler<Root, EntityModel<Root>> {
static final String REL_CONFIGURATION = "configuration"; static final String REL_CONFIGURATION = "configuration";
private final RepositoryRestProperties restProperties; private final RepositoryRestProperties restProperties;
......
...@@ -75,6 +75,7 @@ class RootControllerTest { ...@@ -75,6 +75,7 @@ class RootControllerTest {
ResultActions result = doRequest(); ResultActions result = doRequest();
result.andExpect(jsonPath("$.javaVersion").value(RootTestFactory.JAVA_VERSION)); result.andExpect(jsonPath("$.javaVersion").value(RootTestFactory.JAVA_VERSION));
verify(modelAssembler).toModel(any());
} }
@Test @Test
...@@ -85,6 +86,7 @@ class RootControllerTest { ...@@ -85,6 +86,7 @@ class RootControllerTest {
ResultActions result = doRequest(); ResultActions result = doRequest();
result.andExpect(jsonPath("$.buildVersion").value(RootTestFactory.BUILD_VERSION)); result.andExpect(jsonPath("$.buildVersion").value(RootTestFactory.BUILD_VERSION));
verify(modelAssembler).toModel(any());
} }
@Test @Test
...@@ -95,6 +97,7 @@ class RootControllerTest { ...@@ -95,6 +97,7 @@ class RootControllerTest {
ResultActions result = doRequest(); ResultActions result = doRequest();
result.andExpect(jsonPath("$.buildTime").value(RootTestFactory.BUILD_TIME.getEpochSecond())); result.andExpect(jsonPath("$.buildTime").value(RootTestFactory.BUILD_TIME.getEpochSecond()));
verify(modelAssembler).toModel(any());
} }
@Test @Test
...@@ -105,6 +108,7 @@ class RootControllerTest { ...@@ -105,6 +108,7 @@ class RootControllerTest {
ResultActions result = doRequest(); ResultActions result = doRequest();
result.andExpect(jsonPath("$.buildNumber").value(RootTestFactory.BUILD_NUMBER)); result.andExpect(jsonPath("$.buildNumber").value(RootTestFactory.BUILD_NUMBER));
verify(modelAssembler).toModel(any());
} }
@SneakyThrows @SneakyThrows
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment