diff --git a/src/main/resources/application-local.yml b/src/main/resources/application-local.yml new file mode 100644 index 0000000..e69de29 diff --git a/src/test/java/com/timcooki/jnuwiki/domain/docs/DocsControllerTest.java b/src/test/java/com/timcooki/jnuwiki/domain/docs/DocsControllerTest.java index 55369dd..b1686ae 100644 --- a/src/test/java/com/timcooki/jnuwiki/domain/docs/DocsControllerTest.java +++ b/src/test/java/com/timcooki/jnuwiki/domain/docs/DocsControllerTest.java @@ -58,7 +58,7 @@ public void findAll_security_filter_test() throws Exception { // given // QueryParmas - MultiValueMap map = new LinkedMultiValueMap<>(); + MultiValueMap map = new LinkedMultiValueMap<>(); map.add("leftLng", "30.0"); map.add("leftLat", "30.0"); map.add("rightLng", "40.0"); @@ -81,7 +81,6 @@ public void findAll_security_filter_test() throws Exception { .totalPages(1) .build(); - Mockito.when(docsReadService.getDocsList(any(), any())).thenReturn(docsList); // when @@ -118,7 +117,10 @@ public void findById_test() throws Exception { // stub Mockito.when(docsReadService.getOneDocs(eq(docsId))).thenReturn( - new ReadResDTO(1L, "내용1", DocsCategory.CONV.getCategory(), new DocsLocation(13.1, 34.3), "1nuu", member.getNickName(), LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss")),true) + new ReadResDTO(1L, "내용1", DocsCategory.CONV.getCategory(), new DocsLocation(13.1, 34.3), "1nuu", + member.getNickName(), + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss")), + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss")), true) ); // when @@ -135,9 +137,9 @@ public void findById_test() throws Exception { } @DisplayName("문서 수정") - @WithMockUser(username = "testUser@naver.com",roles = "USER") + @WithMockUser(username = "testUser@naver.com", roles = "USER") @Test - public void docs_update_test() throws Exception{ + public void docs_update_test() throws Exception { // given Long docsId = 1L; String docsContent = "수정된 문서내용"; @@ -177,9 +179,9 @@ public void docs_update_test() throws Exception{ } @DisplayName("문서 검색") - @WithMockUser(username = "testUser@naver.com",roles = "USER") + @WithMockUser(username = "testUser@naver.com", roles = "USER") @Test - public void docs_search_test() throws Exception{ + public void docs_search_test() throws Exception { // given String search = "검색"; MultiValueMap queryParam = new LinkedMultiValueMap<>(); @@ -196,7 +198,7 @@ public void docs_search_test() throws Exception{ Mockito.when( docsReadService.searchLike(search) ).thenReturn( - dtoList + dtoList ); // when @@ -208,8 +210,6 @@ public void docs_search_test() throws Exception{ .characterEncoding(StandardCharsets.UTF_8) ); - - // then String res = resultActions.andReturn().getResponse().getContentAsString(); System.out.println("테스트 : " + res); @@ -223,4 +223,4 @@ public void docs_search_test() throws Exception{ } -} \ No newline at end of file +}