From 4e52dcfabbc0a35da3b360b8fcad76ad6dbee94a Mon Sep 17 00:00:00 2001 From: joon Date: Mon, 19 Feb 2024 08:57:15 +0900 Subject: [PATCH 1/9] =?UTF-8?q?[test]=20=EC=A7=88=EB=AC=B8=20=EA=B8=80=20?= =?UTF-8?q?=EB=8D=94=EB=AF=B8=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qp/web/controller/QuestionController.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/qp/official/qp/web/controller/QuestionController.java b/src/main/java/qp/official/qp/web/controller/QuestionController.java index 2677db96..19b19cd9 100644 --- a/src/main/java/qp/official/qp/web/controller/QuestionController.java +++ b/src/main/java/qp/official/qp/web/controller/QuestionController.java @@ -60,6 +60,18 @@ public ApiResponse createQuestion( ); } + @PostMapping("/dummyQuestion") + @Operation( + summary = "질문 작성(더미 데이터) API" + , description = "Header에 accessToken 필요. 로그인 된 Id로 총 100개의 질문이 생성됩니다. 어린이 여부는 'INACTICE'로 설정 됩니다." + , security = @SecurityRequirement(name = "accessToken") + ) + public void createDummyQuestion(Long userId) { + // accessToken으로 유효한 유저인지 인가 + tokenService.isValidToken(userId); + questionCommandService.createDummyQuestion(userId); + } + // 특정 질문 조회 @GetMapping("/{questionId}") @Operation(summary = "특정 질문 조회 API",description = "path variable로 조회 할 questionId를 입력하세요.") From 1a301f20b1ba955959858ecbaf7647c1b662fe56 Mon Sep 17 00:00:00 2001 From: joon Date: Mon, 19 Feb 2024 08:59:36 +0900 Subject: [PATCH 2/9] =?UTF-8?q?[test]=20userId=EB=A5=BC=20=EC=A0=9C?= =?UTF-8?q?=EC=99=B8=ED=95=98=EA=B3=A0=20=EA=B3=A0=EC=A0=95=EB=90=9C=20?= =?UTF-8?q?=EA=B0=92=EC=9C=BC=EB=A1=9C=20=EC=A7=88=EB=AC=B8=20=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=84=B0=20=ED=95=9C=20=EB=B2=88=EC=97=90=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=ED=95=98=EB=8A=94=20=EB=A1=9C=EC=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../QuestionCommandService.java | 2 ++ .../QuestionCommandServiceImpl.java | 32 +++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/src/main/java/qp/official/qp/service/QuestionService/QuestionCommandService.java b/src/main/java/qp/official/qp/service/QuestionService/QuestionCommandService.java index b6dfce14..7cb47676 100644 --- a/src/main/java/qp/official/qp/service/QuestionService/QuestionCommandService.java +++ b/src/main/java/qp/official/qp/service/QuestionService/QuestionCommandService.java @@ -7,6 +7,8 @@ public interface QuestionCommandService { Question createQuestion(QuestionRequestDTO.CreateDTO request); + void createDummyQuestion(Long userId); + Question updateQuestion(Long questionId, QuestionRequestDTO.UpdateDTO request); void deleteQuestion(Long questionId); diff --git a/src/main/java/qp/official/qp/service/QuestionService/QuestionCommandServiceImpl.java b/src/main/java/qp/official/qp/service/QuestionService/QuestionCommandServiceImpl.java index cf14b66a..ae4184a2 100644 --- a/src/main/java/qp/official/qp/service/QuestionService/QuestionCommandServiceImpl.java +++ b/src/main/java/qp/official/qp/service/QuestionService/QuestionCommandServiceImpl.java @@ -9,6 +9,7 @@ import qp.official.qp.domain.Hashtag; import qp.official.qp.domain.Question; import qp.official.qp.domain.User; +import qp.official.qp.domain.enums.ChildStatus; import qp.official.qp.domain.mapping.UserQuestionAlarm; import qp.official.qp.repository.HashtagRepository; import qp.official.qp.repository.QuestionHashTagRepository; @@ -17,6 +18,7 @@ import qp.official.qp.repository.UserRepository; import qp.official.qp.web.dto.QuestionRequestDTO; +import java.util.ArrayList; import java.util.List; @Service @@ -54,6 +56,36 @@ public Question createQuestion(QuestionRequestDTO.CreateDTO request) { return questionRepository.save(newQuestion); } + @Override + public void createDummyQuestion(Long userId) { + for (int i = 0; i < 100; i++){ + String title = "title" + i; + String content = "content" + i; + ArrayList hashtagIds = new ArrayList<>(); + ArrayList hashtags = new ArrayList<>(); + + int hashtagSize = 2; + for (int j = 1; j <= hashtagSize; j++) { + Hashtag newHashTag = Hashtag.builder() + .hashtagId(((long) j)) + .hashtag("hashtag" + j) + .questionHashTagList(new ArrayList<>()) + .build(); + hashtags.add(newHashTag); + } + + QuestionRequestDTO.CreateDTO newQuestion = QuestionRequestDTO.CreateDTO.builder() + .userId(userId) + .title(title) + .content(content) + .childStatus(ChildStatus.INACTIVE) + .hashtag(hashtagIds) + .build(); + createQuestion(newQuestion); + } + + } + @Override public Question updateQuestion(Long questionId, QuestionRequestDTO.UpdateDTO request) { // FindById Question From a48f898ff77e281a83148d7c9306ce7854ebec24 Mon Sep 17 00:00:00 2001 From: joon Date: Mon, 19 Feb 2024 17:49:21 +0900 Subject: [PATCH 3/9] =?UTF-8?q?[test]=20=ED=86=A0=ED=81=B0=20=EC=97=86?= =?UTF-8?q?=EC=9D=B4=20=EC=A7=88=EB=AC=B8=20=EB=8D=94=EB=AF=B8=20=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=84=B0=20=EC=83=9D=EC=84=B1=ED=95=A0=20=EC=88=98=20?= =?UTF-8?q?=EC=9E=88=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qp/service/QuestionService/QuestionCommandService.java | 2 +- .../qp/service/QuestionService/QuestionCommandServiceImpl.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/qp/official/qp/service/QuestionService/QuestionCommandService.java b/src/main/java/qp/official/qp/service/QuestionService/QuestionCommandService.java index 7cb47676..4e8ba60b 100644 --- a/src/main/java/qp/official/qp/service/QuestionService/QuestionCommandService.java +++ b/src/main/java/qp/official/qp/service/QuestionService/QuestionCommandService.java @@ -7,7 +7,7 @@ public interface QuestionCommandService { Question createQuestion(QuestionRequestDTO.CreateDTO request); - void createDummyQuestion(Long userId); + void createDummyQuestion(); Question updateQuestion(Long questionId, QuestionRequestDTO.UpdateDTO request); diff --git a/src/main/java/qp/official/qp/service/QuestionService/QuestionCommandServiceImpl.java b/src/main/java/qp/official/qp/service/QuestionService/QuestionCommandServiceImpl.java index ae4184a2..f4f59d9b 100644 --- a/src/main/java/qp/official/qp/service/QuestionService/QuestionCommandServiceImpl.java +++ b/src/main/java/qp/official/qp/service/QuestionService/QuestionCommandServiceImpl.java @@ -57,7 +57,8 @@ public Question createQuestion(QuestionRequestDTO.CreateDTO request) { } @Override - public void createDummyQuestion(Long userId) { + public void createDummyQuestion() { + Long userId = 1L; for (int i = 0; i < 100; i++){ String title = "title" + i; String content = "content" + i; From dba4780c342d7f1be1e9bc3acc4522083448a9ae Mon Sep 17 00:00:00 2001 From: joon Date: Mon, 19 Feb 2024 17:49:40 +0900 Subject: [PATCH 4/9] =?UTF-8?q?[test]=20=ED=86=A0=ED=81=B0=20=EC=97=86?= =?UTF-8?q?=EC=9D=B4=20=EC=A7=88=EB=AC=B8=20=EB=8D=94=EB=AF=B8=20=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=84=B0=20=EC=83=9D=EC=84=B1=ED=95=A0=20=EC=88=98=20?= =?UTF-8?q?=EC=9E=88=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qp/official/qp/web/controller/QuestionController.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/java/qp/official/qp/web/controller/QuestionController.java b/src/main/java/qp/official/qp/web/controller/QuestionController.java index 19b19cd9..da174d42 100644 --- a/src/main/java/qp/official/qp/web/controller/QuestionController.java +++ b/src/main/java/qp/official/qp/web/controller/QuestionController.java @@ -63,13 +63,11 @@ public ApiResponse createQuestion( @PostMapping("/dummyQuestion") @Operation( summary = "질문 작성(더미 데이터) API" - , description = "Header에 accessToken 필요. 로그인 된 Id로 총 100개의 질문이 생성됩니다. 어린이 여부는 'INACTICE'로 설정 됩니다." + , description = "총 100개의 질문이 생성됩니다. 어린이 여부는 'INACTICE'로 설정 됩니다." , security = @SecurityRequirement(name = "accessToken") ) - public void createDummyQuestion(Long userId) { - // accessToken으로 유효한 유저인지 인가 - tokenService.isValidToken(userId); - questionCommandService.createDummyQuestion(userId); + public void createDummyQuestion() { + questionCommandService.createDummyQuestion(); } // 특정 질문 조회 From 1f2f7c961d748a335dc10d75ec32aed0bde3f34d Mon Sep 17 00:00:00 2001 From: joon Date: Mon, 19 Feb 2024 21:08:09 +0900 Subject: [PATCH 5/9] =?UTF-8?q?[test]=20=EB=8D=94=EB=AF=B8=20=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=84=B0=20=EC=83=9D=EC=84=B1=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../official/qp/web/controller/QuestionController.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/main/java/qp/official/qp/web/controller/QuestionController.java b/src/main/java/qp/official/qp/web/controller/QuestionController.java index 1c337665..7ca02ac6 100644 --- a/src/main/java/qp/official/qp/web/controller/QuestionController.java +++ b/src/main/java/qp/official/qp/web/controller/QuestionController.java @@ -60,16 +60,6 @@ public ApiResponse createQuestion( ); } - @PostMapping("/dummyQuestion") - @Operation( - summary = "질문 작성(더미 데이터) API" - , description = "총 100개의 질문이 생성됩니다. 어린이 여부는 'INACTICE'로 설정 됩니다." - , security = @SecurityRequirement(name = "accessToken") - ) - public void createDummyQuestion() { - questionCommandService.createDummyQuestion(); - } - // 특정 질문 조회 @GetMapping("/{questionId}") @Operation(summary = "특정 질문 조회 API",description = "# path variable로 조회 할 questionId를 입력하세요. \n" + From 23e90342598e17c06448066372ec25fe9be5d397 Mon Sep 17 00:00:00 2001 From: joon Date: Mon, 19 Feb 2024 21:08:37 +0900 Subject: [PATCH 6/9] =?UTF-8?q?[test]=20=EB=8D=94=EB=AF=B8=20=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=84=B0=20=EC=83=9D=EC=84=B1=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../QuestionCommandService.java | 2 -- .../QuestionCommandServiceImpl.java | 31 ------------------- 2 files changed, 33 deletions(-) diff --git a/src/main/java/qp/official/qp/service/QuestionService/QuestionCommandService.java b/src/main/java/qp/official/qp/service/QuestionService/QuestionCommandService.java index 4e8ba60b..b6dfce14 100644 --- a/src/main/java/qp/official/qp/service/QuestionService/QuestionCommandService.java +++ b/src/main/java/qp/official/qp/service/QuestionService/QuestionCommandService.java @@ -7,8 +7,6 @@ public interface QuestionCommandService { Question createQuestion(QuestionRequestDTO.CreateDTO request); - void createDummyQuestion(); - Question updateQuestion(Long questionId, QuestionRequestDTO.UpdateDTO request); void deleteQuestion(Long questionId); diff --git a/src/main/java/qp/official/qp/service/QuestionService/QuestionCommandServiceImpl.java b/src/main/java/qp/official/qp/service/QuestionService/QuestionCommandServiceImpl.java index f4f59d9b..2ca49a69 100644 --- a/src/main/java/qp/official/qp/service/QuestionService/QuestionCommandServiceImpl.java +++ b/src/main/java/qp/official/qp/service/QuestionService/QuestionCommandServiceImpl.java @@ -56,37 +56,6 @@ public Question createQuestion(QuestionRequestDTO.CreateDTO request) { return questionRepository.save(newQuestion); } - @Override - public void createDummyQuestion() { - Long userId = 1L; - for (int i = 0; i < 100; i++){ - String title = "title" + i; - String content = "content" + i; - ArrayList hashtagIds = new ArrayList<>(); - ArrayList hashtags = new ArrayList<>(); - - int hashtagSize = 2; - for (int j = 1; j <= hashtagSize; j++) { - Hashtag newHashTag = Hashtag.builder() - .hashtagId(((long) j)) - .hashtag("hashtag" + j) - .questionHashTagList(new ArrayList<>()) - .build(); - hashtags.add(newHashTag); - } - - QuestionRequestDTO.CreateDTO newQuestion = QuestionRequestDTO.CreateDTO.builder() - .userId(userId) - .title(title) - .content(content) - .childStatus(ChildStatus.INACTIVE) - .hashtag(hashtagIds) - .build(); - createQuestion(newQuestion); - } - - } - @Override public Question updateQuestion(Long questionId, QuestionRequestDTO.UpdateDTO request) { // FindById Question From f9ed9da4364387046b5180658573f98705692073 Mon Sep 17 00:00:00 2001 From: joon Date: Mon, 19 Feb 2024 21:09:45 +0900 Subject: [PATCH 7/9] =?UTF-8?q?[test]=20=EB=8D=94=EB=AF=B8=20=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=84=B0=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qp/QpBackendApplicationTests.java | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/src/test/java/qp/official/qp/QpBackendApplicationTests.java b/src/test/java/qp/official/qp/QpBackendApplicationTests.java index 844f8e34..cb510c37 100644 --- a/src/test/java/qp/official/qp/QpBackendApplicationTests.java +++ b/src/test/java/qp/official/qp/QpBackendApplicationTests.java @@ -1,13 +1,81 @@ package qp.official.qp; import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.annotation.Rollback; +import qp.official.qp.domain.Hashtag; +import qp.official.qp.domain.Question; +import qp.official.qp.domain.User; +import qp.official.qp.domain.enums.Category; +import qp.official.qp.domain.enums.ChildStatus; +import qp.official.qp.service.AnswerService.AnswerCommandServiceImpl; +import qp.official.qp.service.QuestionService.QuestionCommandServiceImpl; +import qp.official.qp.service.UserService.UserServiceImpl; +import qp.official.qp.web.dto.AnswerRequestDTO; +import qp.official.qp.web.dto.QuestionRequestDTO; + +import java.util.ArrayList; @SpringBootTest class QpBackendApplicationTests { + @Autowired + private UserServiceImpl userService; + + @Autowired + private QuestionCommandServiceImpl questionCommandService; + + @Autowired + private AnswerCommandServiceImpl answerCommandService; + @Test void contextLoads() { } + // Create 100 dummy questions +// @Test +// @Rollback(value = false) +// public void createDummyQuestion() { +// User testUser = userService.createTestUser(); +// +// System.out.println(testUser.getUserId()); +// for (int i = 0; i < 100; i++){ +// String title = "title" + i; +// String content = "content" + i; +// ArrayList hashtagIds = new ArrayList<>(); +// ArrayList hashtags = new ArrayList<>(); +// +// int hashtagSize = 2; +// for (int j = 1; j <= hashtagSize; j++) { +// Hashtag newHashTag = Hashtag.builder() +// .hashtagId(((long) j)) +// .hashtag("hashtag" + j) +// .questionHashTagList(new ArrayList<>()) +// .build(); +// hashtags.add(newHashTag); +// } +// +// QuestionRequestDTO.CreateDTO newQuestion = QuestionRequestDTO.CreateDTO.builder() +// .userId(testUser.getUserId()) +// .title(title) +// .content(content) +// .childStatus(ChildStatus.INACTIVE) +// .hashtag(hashtagIds) +// .build(); +// Question question = questionCommandService.createQuestion(newQuestion); +// +// AnswerRequestDTO.AnswerCreateDTO newAnswer = AnswerRequestDTO.AnswerCreateDTO.builder() +// .userId(testUser.getUserId()) +// .title("testTitle") +// .content("testContent") +// .category(Category.PARENT) +// .build(); +// +// answerCommandService.createAnswer(newAnswer, question.getQuestionId()); +// +// } +// +// } + } From 35e3193bba87e2afc89dda2ac610839f931ff240 Mon Sep 17 00:00:00 2001 From: joon Date: Mon, 19 Feb 2024 21:17:40 +0900 Subject: [PATCH 8/9] =?UTF-8?q?[test]=20=EB=8D=94=EB=AF=B8=20=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=84=B0=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/qp/official/qp/QpBackendApplicationTests.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/test/java/qp/official/qp/QpBackendApplicationTests.java b/src/test/java/qp/official/qp/QpBackendApplicationTests.java index cb510c37..c027bc5d 100644 --- a/src/test/java/qp/official/qp/QpBackendApplicationTests.java +++ b/src/test/java/qp/official/qp/QpBackendApplicationTests.java @@ -39,7 +39,6 @@ void contextLoads() { // public void createDummyQuestion() { // User testUser = userService.createTestUser(); // -// System.out.println(testUser.getUserId()); // for (int i = 0; i < 100; i++){ // String title = "title" + i; // String content = "content" + i; @@ -65,10 +64,12 @@ void contextLoads() { // .build(); // Question question = questionCommandService.createQuestion(newQuestion); // +// String testAnswerTitle = "testAnswerTitle"+i; +// String testAnswerContent = "testAnswerContent"+i; // AnswerRequestDTO.AnswerCreateDTO newAnswer = AnswerRequestDTO.AnswerCreateDTO.builder() // .userId(testUser.getUserId()) -// .title("testTitle") -// .content("testContent") +// .title(testAnswerTitle) +// .content(testAnswerContent) // .category(Category.PARENT) // .build(); // From a684cbb0f829767d5e388225ffca0cd97a2d3d82 Mon Sep 17 00:00:00 2001 From: joon Date: Mon, 19 Feb 2024 21:50:26 +0900 Subject: [PATCH 9/9] =?UTF-8?q?[test]=20=EC=A7=88=EB=AC=B8=20=EB=B0=8F=20?= =?UTF-8?q?=EB=8B=B5=EB=B3=80=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=84=B0=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qp/QpBackendApplicationTests.java | 46 ++++++++++++++----- 1 file changed, 35 insertions(+), 11 deletions(-) diff --git a/src/test/java/qp/official/qp/QpBackendApplicationTests.java b/src/test/java/qp/official/qp/QpBackendApplicationTests.java index c027bc5d..1bcec411 100644 --- a/src/test/java/qp/official/qp/QpBackendApplicationTests.java +++ b/src/test/java/qp/official/qp/QpBackendApplicationTests.java @@ -4,6 +4,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.annotation.Rollback; +import qp.official.qp.domain.Answer; import qp.official.qp.domain.Hashtag; import qp.official.qp.domain.Question; import qp.official.qp.domain.User; @@ -33,13 +34,18 @@ class QpBackendApplicationTests { void contextLoads() { } - // Create 100 dummy questions + // Create 30 dummy questions + // Create 3 parent answers for each question + // Create 2 child answers for each parent answer + // 부모답변1-자식답변1, 부모답변2-자식답변2, 부모답변3 형식으로 되어 있다. // @Test // @Rollback(value = false) // public void createDummyQuestion() { // User testUser = userService.createTestUser(); // -// for (int i = 0; i < 100; i++){ +// // 질문 30개 생성 +// int questionSize = 30; +// for (int i = 0; i < questionSize; i++){ // String title = "title" + i; // String content = "content" + i; // ArrayList hashtagIds = new ArrayList<>(); @@ -64,16 +70,34 @@ void contextLoads() { // .build(); // Question question = questionCommandService.createQuestion(newQuestion); // -// String testAnswerTitle = "testAnswerTitle"+i; -// String testAnswerContent = "testAnswerContent"+i; -// AnswerRequestDTO.AnswerCreateDTO newAnswer = AnswerRequestDTO.AnswerCreateDTO.builder() -// .userId(testUser.getUserId()) -// .title(testAnswerTitle) -// .content(testAnswerContent) -// .category(Category.PARENT) -// .build(); +// // parent 답변 3개 생성 +// int parentAnswerSize = 3; +// for(int j = 0; j < parentAnswerSize; j++){ +// String parentAnswerTitle = "parentTitle"+j; +// String parentAnswerContent = "parentContent"+j; +// AnswerRequestDTO.AnswerCreateDTO newAnswer = AnswerRequestDTO.AnswerCreateDTO.builder() +// .userId(testUser.getUserId()) +// .title(parentAnswerTitle) +// .content(parentAnswerContent) +// .category(Category.PARENT) +// .build(); +// Answer parent = answerCommandService.createAnswer(newAnswer, question.getQuestionId()); // -// answerCommandService.createAnswer(newAnswer, question.getQuestionId()); +// // child 답변은 두 개만 생성 +// if(j < parentAnswerSize-1) { +// String childAnswerTitle = "childAnswerTitle"; +// String childAnswerContent = "childAnswerContent"; +// AnswerRequestDTO.AnswerCreateDTO newChildAnswer = AnswerRequestDTO.AnswerCreateDTO.builder() +// .userId(testUser.getUserId()) +// .title(childAnswerTitle) +// .content(childAnswerContent) +// .category(Category.CHILD) +// .answerGroup(parent.getAnswerId()) +// .build(); +// answerCommandService.createAnswer(newChildAnswer, question.getQuestionId()); +// } +// +// } // // } //