Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Test
- @WithMockUser(username = "test", password = "test", roles = "USER")
- public void givenDepartmentName_whenSuggestDepartment_thenReturnNameJson() throws Exception {
- String name = "RSPI";
- String location = "Wroclaw";
- String positionName = "(Senior) AR/VR Developer";
- PositionNameAndLocationRequest positionNameAndLocationRequest = new PositionNameAndLocationRequest(location, positionName);
- given(algorithmService.suggestDepartment(positionNameAndLocationRequest)).willReturn(name);
- mvc.perform(post("/api/algorithm/suggest")
- .content(asJsonString(positionNameAndLocationRequest))
- .contentType(MediaType.APPLICATION_JSON))
- .andExpect(status().isOk())
- .andExpect(jsonPath("$.message", is(name)));
- }
Add Comment
Please, Sign In to add comment