From b5ef0d4f153f5448629701a284b724cff2b70f5d Mon Sep 17 00:00:00 2001 From: Choi Seongwon Date: Thu, 26 Oct 2023 17:36:21 +0900 Subject: [PATCH 1/6] =?UTF-8?q?feat:=20=ED=81=B4=EB=9F=BD=20=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=20=EA=B8=B0=EB=8A=A5=20=EA=B5=AC=ED=98=84,=20?= =?UTF-8?q?=EC=97=B0=EA=B4=80=20=ED=85=8C=EC=9D=B4=EB=B8=94=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../club/controller/ClubController.java | 8 +++-- .../club/controller/dto/ClubGetResponse.java | 29 ++++++++++++++++ .../java/com/spaceclub/club/domain/Club.java | 31 ++++++++++++++++- .../com/spaceclub/club/domain/ClubNotice.java | 31 +++++++++++++++++ .../com/spaceclub/club/domain/ClubUser.java | 33 +++++++++++++++++++ .../spaceclub/club/service/ClubService.java | 5 +++ 6 files changed, 134 insertions(+), 3 deletions(-) create mode 100644 src/main/java/com/spaceclub/club/controller/dto/ClubGetResponse.java create mode 100644 src/main/java/com/spaceclub/club/domain/ClubNotice.java create mode 100644 src/main/java/com/spaceclub/club/domain/ClubUser.java diff --git a/src/main/java/com/spaceclub/club/controller/ClubController.java b/src/main/java/com/spaceclub/club/controller/ClubController.java index af9e661b..67fa4039 100644 --- a/src/main/java/com/spaceclub/club/controller/ClubController.java +++ b/src/main/java/com/spaceclub/club/controller/ClubController.java @@ -1,5 +1,6 @@ package com.spaceclub.club.controller; +import com.spaceclub.club.controller.dto.ClubGetResponse; import com.spaceclub.club.controller.dto.CreateClubRequest; import com.spaceclub.club.domain.Club; import com.spaceclub.club.service.ClubService; @@ -32,8 +33,11 @@ public ResponseEntity createClub(@RequestBody CreateClubRequest request) } @GetMapping("/clubs/{clubId}") - public ResponseEntity getClub(@PathVariable Long clubId) { - return ResponseEntity.ok("get club."); + public ResponseEntity getClub(@PathVariable Long clubId) { + Club club = service.getClub(clubId); + ClubGetResponse response = club.toGetResponseDto(); + + return ResponseEntity.ok(response); } @DeleteMapping("/clubs/{clubId}") diff --git a/src/main/java/com/spaceclub/club/controller/dto/ClubGetResponse.java b/src/main/java/com/spaceclub/club/controller/dto/ClubGetResponse.java new file mode 100644 index 00000000..cd796a78 --- /dev/null +++ b/src/main/java/com/spaceclub/club/controller/dto/ClubGetResponse.java @@ -0,0 +1,29 @@ +package com.spaceclub.club.controller.dto; + +import com.spaceclub.club.domain.ClubNotice; +import lombok.Builder; + +import java.util.ArrayList; +import java.util.List; + +public record ClubGetResponse( + String name, + String info, + Long memberCount, + String image, + String[] notices +) { + + @Builder + public ClubGetResponse(String name, String info, Long memberCount, String image, List notices) { + this( + name, + info, + memberCount, + image, + notices.stream() + .map(ClubNotice::getNotice) + .toArray(String[]::new)); + } + +} diff --git a/src/main/java/com/spaceclub/club/domain/Club.java b/src/main/java/com/spaceclub/club/domain/Club.java index db50248c..78893968 100644 --- a/src/main/java/com/spaceclub/club/domain/Club.java +++ b/src/main/java/com/spaceclub/club/domain/Club.java @@ -1,17 +1,22 @@ package com.spaceclub.club.domain; +import com.spaceclub.club.controller.dto.ClubGetResponse; import com.spaceclub.global.BaseTimeEntity; import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; import jakarta.persistence.Lob; +import jakarta.persistence.OneToMany; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; import org.springframework.util.Assert; +import java.util.ArrayList; +import java.util.List; + @Entity @NoArgsConstructor(access = AccessLevel.PROTECTED) public class Club extends BaseTimeEntity { @@ -33,12 +38,18 @@ public class Club extends BaseTimeEntity { private String owner; + @OneToMany(mappedBy = "club") + private List notices = new ArrayList<>(); + + @OneToMany(mappedBy = "club") + private List clubUser = new ArrayList<>(); + private boolean validateNameLength(String name) { return name.length() <= 12; } @Builder - public Club(String name, String image, String info, String owner) { + public Club(String name, String image, String info, String owner, List notices) { Assert.notNull(name, "이름에 null 값이 올 수 없습니다"); Assert.hasText(name, "이름이 빈 값일 수 없습니다"); Assert.isTrue(validateNameLength(name), "이름의 길이는 12글자를 넘을 수 없습니다"); @@ -48,6 +59,24 @@ public Club(String name, String image, String info, String owner) { this.image = image; this.info = info; this.owner = owner; + + if (notices != null) { + this.notices = new ArrayList<>(notices); + } + } + + public ClubGetResponse toGetResponseDto() { + long memberCount = clubUser.stream() + .filter((user) -> user.getClub().getId().equals(this.id)) + .count(); + + return ClubGetResponse.builder() + .name(name) + .info(info) + .memberCount(memberCount) + .image(image) + .notices(notices) + .build(); } } diff --git a/src/main/java/com/spaceclub/club/domain/ClubNotice.java b/src/main/java/com/spaceclub/club/domain/ClubNotice.java new file mode 100644 index 00000000..0367c6dd --- /dev/null +++ b/src/main/java/com/spaceclub/club/domain/ClubNotice.java @@ -0,0 +1,31 @@ +package com.spaceclub.club.domain; + +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import lombok.AccessLevel; +import lombok.Getter; +import lombok.NoArgsConstructor; + +@Entity +@NoArgsConstructor(access = AccessLevel.PROTECTED) +public class ClubNotice { + + @Id + @Column(name = "club_notice_id") + private Long id; + + @ManyToOne + @JoinColumn(name = "club_id") + private Club club; + + @Getter + private String notice; + + public ClubNotice(String notice) { + this.notice = notice; + } + +} diff --git a/src/main/java/com/spaceclub/club/domain/ClubUser.java b/src/main/java/com/spaceclub/club/domain/ClubUser.java new file mode 100644 index 00000000..c6d07f3d --- /dev/null +++ b/src/main/java/com/spaceclub/club/domain/ClubUser.java @@ -0,0 +1,33 @@ +package com.spaceclub.club.domain; + +import com.spaceclub.global.BaseTimeEntity; +import com.spaceclub.user.domain.User; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import lombok.Getter; + +@Table(name = "club_user") +@Entity +public class ClubUser extends BaseTimeEntity { + + @Id + @Column(name = "club_user_id") + private Long id; + + @Getter + @ManyToOne + @JoinColumn(name = "club_id") + private Club club; + + @ManyToOne + @JoinColumn(name = "user_id") + private User user; + + @Column(length = 16, nullable = false) + private String role; + +} diff --git a/src/main/java/com/spaceclub/club/service/ClubService.java b/src/main/java/com/spaceclub/club/service/ClubService.java index 83bb65b0..b9ea3974 100644 --- a/src/main/java/com/spaceclub/club/service/ClubService.java +++ b/src/main/java/com/spaceclub/club/service/ClubService.java @@ -15,4 +15,9 @@ public Club createClub(Club club) { return repository.save(club); } + public Club getClub(Long clubId) { + return repository.findById(clubId) + .orElseThrow(() -> new IllegalArgumentException("해당하는 클럽이 없습니다")); + } + } From a44f65d0cf3ea852b821f63a38521804df5e83a5 Mon Sep 17 00:00:00 2001 From: Choi Seongwon Date: Thu, 26 Oct 2023 17:36:36 +0900 Subject: [PATCH 2/6] =?UTF-8?q?test:=20=ED=81=B4=EB=9F=BD=20=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=20=EA=B8=B0=EB=8A=A5=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=EC=97=90=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../club/controller/ClubControllerTest.java | 34 ++++++++++++++++--- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/src/test/java/com/spaceclub/club/controller/ClubControllerTest.java b/src/test/java/com/spaceclub/club/controller/ClubControllerTest.java index 0b502044..67367ebe 100644 --- a/src/test/java/com/spaceclub/club/controller/ClubControllerTest.java +++ b/src/test/java/com/spaceclub/club/controller/ClubControllerTest.java @@ -3,6 +3,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.spaceclub.club.controller.dto.CreateClubRequest; import com.spaceclub.club.domain.Club; +import com.spaceclub.club.domain.ClubNotice; import com.spaceclub.club.service.ClubService; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; @@ -16,6 +17,8 @@ import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.ResultActions; +import java.util.List; + import static org.mockito.ArgumentMatchers.any; import static org.mockito.BDDMockito.given; import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document; @@ -25,8 +28,13 @@ import static org.springframework.restdocs.operation.preprocess.Preprocessors.preprocessRequest; import static org.springframework.restdocs.operation.preprocess.Preprocessors.preprocessResponse; import static org.springframework.restdocs.operation.preprocess.Preprocessors.prettyPrint; +import static org.springframework.restdocs.payload.JsonFieldType.ARRAY; +import static org.springframework.restdocs.payload.JsonFieldType.NUMBER; +import static org.springframework.restdocs.payload.JsonFieldType.OBJECT; +import static org.springframework.restdocs.payload.JsonFieldType.STRING; import static org.springframework.restdocs.payload.PayloadDocumentation.fieldWithPath; import static org.springframework.restdocs.payload.PayloadDocumentation.requestFields; +import static org.springframework.restdocs.payload.PayloadDocumentation.responseFields; import static org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.csrf; import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; @@ -74,10 +82,10 @@ void createClubTest() throws Exception { preprocessRequest(prettyPrint()), preprocessResponse(prettyPrint()), requestFields( - fieldWithPath("name").type(JsonFieldType.STRING).description("클럽 이름"), - fieldWithPath("info").type(JsonFieldType.STRING).description("클럽 소개"), - fieldWithPath("owner").type(JsonFieldType.STRING).description("클럽 생성자"), - fieldWithPath("image").type(JsonFieldType.STRING).description("클럽 썸네일 이미지") + fieldWithPath("name").type(STRING).description("클럽 이름"), + fieldWithPath("info").type(STRING).description("클럽 소개"), + fieldWithPath("owner").type(STRING).description("클럽 생성자"), + fieldWithPath("image").type(STRING).description("클럽 썸네일 이미지") ))); } @@ -86,6 +94,15 @@ void createClubTest() throws Exception { @WithMockUser void getClubTest() throws Exception { // given + given(clubService.getClub(any(Long.class))).willReturn( + Club.builder() + .name("연사모") + .info("이곳은 연사모입니다") + .image("연어.png") + .owner("연어대장") + .notices(List.of(new ClubNotice("연사모의 공지사항1"))) + .build() + ); Long clubId = 1L; // when @@ -98,7 +115,14 @@ void getClubTest() throws Exception { .andDo(print()) .andDo(document("club/get", preprocessRequest(prettyPrint()), - preprocessResponse(prettyPrint()))); + preprocessResponse(prettyPrint()), + responseFields( + fieldWithPath("name").type(STRING).description("클럽 이름"), + fieldWithPath("info").type(STRING).description("클럽 소개"), + fieldWithPath("memberCount").type(NUMBER).description("클럽 멤버수"), + fieldWithPath("image").type(STRING).description("클럽 썸네일 이미지"), + fieldWithPath("notices").type(ARRAY).description("클럽 공지사항 리스트") + ))); } @Test From 211b1b4bfc0dbaefafb87352e7a9fe9076724090 Mon Sep 17 00:00:00 2001 From: Choi Seongwon Date: Fri, 27 Oct 2023 14:10:14 +0900 Subject: [PATCH 3/6] =?UTF-8?q?feat:=20=EC=84=9C=EB=B9=84=EC=8A=A4=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=EC=97=90=20=ED=8A=B8=EB=9E=9C=EC=9E=AD?= =?UTF-8?q?=EC=85=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/spaceclub/club/service/ClubService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/spaceclub/club/service/ClubService.java b/src/main/java/com/spaceclub/club/service/ClubService.java index b9ea3974..132aded1 100644 --- a/src/main/java/com/spaceclub/club/service/ClubService.java +++ b/src/main/java/com/spaceclub/club/service/ClubService.java @@ -4,8 +4,10 @@ import com.spaceclub.club.repository.ClubRepository; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; @Service +@Transactional @RequiredArgsConstructor public class ClubService { From 2c735028c91e4d73a02edef3c591e18499e806d0 Mon Sep 17 00:00:00 2001 From: Choi Seongwon Date: Fri, 27 Oct 2023 14:10:50 +0900 Subject: [PATCH 4/6] =?UTF-8?q?test:=20DisplayName=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../club/controller/ClubControllerTest.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/test/java/com/spaceclub/club/controller/ClubControllerTest.java b/src/test/java/com/spaceclub/club/controller/ClubControllerTest.java index 67367ebe..76d4564d 100644 --- a/src/test/java/com/spaceclub/club/controller/ClubControllerTest.java +++ b/src/test/java/com/spaceclub/club/controller/ClubControllerTest.java @@ -5,14 +5,12 @@ import com.spaceclub.club.domain.Club; import com.spaceclub.club.domain.ClubNotice; import com.spaceclub.club.service.ClubService; -import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.restdocs.AutoConfigureRestDocs; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.http.MediaType; -import org.springframework.restdocs.payload.JsonFieldType; import org.springframework.security.test.context.support.WithMockUser; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.ResultActions; @@ -30,7 +28,6 @@ import static org.springframework.restdocs.operation.preprocess.Preprocessors.prettyPrint; import static org.springframework.restdocs.payload.JsonFieldType.ARRAY; import static org.springframework.restdocs.payload.JsonFieldType.NUMBER; -import static org.springframework.restdocs.payload.JsonFieldType.OBJECT; import static org.springframework.restdocs.payload.JsonFieldType.STRING; import static org.springframework.restdocs.payload.PayloadDocumentation.fieldWithPath; import static org.springframework.restdocs.payload.PayloadDocumentation.requestFields; @@ -53,9 +50,8 @@ class ClubControllerTest { private ClubService clubService; @Test - @DisplayName("클럽 생성에 성공한다") @WithMockUser - void createClubTest() throws Exception { + void 클럽_생성에_성공한다() throws Exception { // given given(clubService.createClub(any(Club.class))).willReturn( Club.builder() @@ -90,9 +86,8 @@ void createClubTest() throws Exception { } @Test - @DisplayName("클럽 조회에 성공한다") @WithMockUser - void getClubTest() throws Exception { + void 클럽_조회에_성공한다() throws Exception { // given given(clubService.getClub(any(Long.class))).willReturn( Club.builder() @@ -126,9 +121,8 @@ void getClubTest() throws Exception { } @Test - @DisplayName("클럽 삭제에 성공한다") @WithMockUser - void deleteClubTest() throws Exception { + void 클럽_삭제에_성공한다() throws Exception { // given Long clubId = 1L; From f6d0ab83ed5133d99c6a9078706bca294aa549ab Mon Sep 17 00:00:00 2001 From: Choi Seongwon Date: Fri, 27 Oct 2023 15:51:46 +0900 Subject: [PATCH 5/6] =?UTF-8?q?refactor:=20=EC=BB=A8=EB=B2=A4=EC=85=98=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../club/controller/ClubController.java | 6 ++-- ...lubRequest.java => ClubCreateRequest.java} | 2 +- .../club/controller/dto/ClubGetResponse.java | 32 +++++++++++++------ .../java/com/spaceclub/club/domain/Club.java | 21 ++++-------- .../club/controller/ClubControllerTest.java | 4 +-- 5 files changed, 35 insertions(+), 30 deletions(-) rename src/main/java/com/spaceclub/club/controller/dto/{CreateClubRequest.java => ClubCreateRequest.java} (92%) diff --git a/src/main/java/com/spaceclub/club/controller/ClubController.java b/src/main/java/com/spaceclub/club/controller/ClubController.java index 67fa4039..6d668633 100644 --- a/src/main/java/com/spaceclub/club/controller/ClubController.java +++ b/src/main/java/com/spaceclub/club/controller/ClubController.java @@ -1,7 +1,7 @@ package com.spaceclub.club.controller; import com.spaceclub.club.controller.dto.ClubGetResponse; -import com.spaceclub.club.controller.dto.CreateClubRequest; +import com.spaceclub.club.controller.dto.ClubCreateRequest; import com.spaceclub.club.domain.Club; import com.spaceclub.club.service.ClubService; import lombok.RequiredArgsConstructor; @@ -24,7 +24,7 @@ public class ClubController { private final ClubService service; @PostMapping("/clubs") - public ResponseEntity createClub(@RequestBody CreateClubRequest request) { + public ResponseEntity createClub(@RequestBody ClubCreateRequest request) { Club newClub = request.toEntity(); Club createdClub = service.createClub(newClub); Long id = createdClub.getId(); @@ -35,7 +35,7 @@ public ResponseEntity createClub(@RequestBody CreateClubRequest request) @GetMapping("/clubs/{clubId}") public ResponseEntity getClub(@PathVariable Long clubId) { Club club = service.getClub(clubId); - ClubGetResponse response = club.toGetResponseDto(); + ClubGetResponse response = ClubGetResponse.from(club); return ResponseEntity.ok(response); } diff --git a/src/main/java/com/spaceclub/club/controller/dto/CreateClubRequest.java b/src/main/java/com/spaceclub/club/controller/dto/ClubCreateRequest.java similarity index 92% rename from src/main/java/com/spaceclub/club/controller/dto/CreateClubRequest.java rename to src/main/java/com/spaceclub/club/controller/dto/ClubCreateRequest.java index cb9e82c9..7784a2eb 100644 --- a/src/main/java/com/spaceclub/club/controller/dto/CreateClubRequest.java +++ b/src/main/java/com/spaceclub/club/controller/dto/ClubCreateRequest.java @@ -2,7 +2,7 @@ import com.spaceclub.club.domain.Club; -public record CreateClubRequest( +public record ClubCreateRequest( String name, String info, String owner, diff --git a/src/main/java/com/spaceclub/club/controller/dto/ClubGetResponse.java b/src/main/java/com/spaceclub/club/controller/dto/ClubGetResponse.java index cd796a78..ae62111d 100644 --- a/src/main/java/com/spaceclub/club/controller/dto/ClubGetResponse.java +++ b/src/main/java/com/spaceclub/club/controller/dto/ClubGetResponse.java @@ -1,5 +1,6 @@ package com.spaceclub.club.controller.dto; +import com.spaceclub.club.domain.Club; import com.spaceclub.club.domain.ClubNotice; import lombok.Builder; @@ -11,19 +12,32 @@ public record ClubGetResponse( String info, Long memberCount, String image, - String[] notices + List notices ) { @Builder - public ClubGetResponse(String name, String info, Long memberCount, String image, List notices) { - this( - name, - info, - memberCount, - image, - notices.stream() + public ClubGetResponse(String name, String info, Long memberCount, String image, List notices) { + this.name = name; + this.info = info; + this.memberCount = memberCount; + this.image = image; + this.notices = new ArrayList<>(notices); + } + + public static ClubGetResponse from(Club club) { + long memberCount = club.getClubUser().stream() + .filter((user) -> user.getClub().getId().equals(club.getId())) + .count(); + + return ClubGetResponse.builder() + .name(club.getName()) + .info(club.getInfo()) + .memberCount(memberCount) + .image(club.getImage()) + .notices(club.getNotices().stream() .map(ClubNotice::getNotice) - .toArray(String[]::new)); + .toList()) + .build(); } } diff --git a/src/main/java/com/spaceclub/club/domain/Club.java b/src/main/java/com/spaceclub/club/domain/Club.java index 78893968..1947e18e 100644 --- a/src/main/java/com/spaceclub/club/domain/Club.java +++ b/src/main/java/com/spaceclub/club/domain/Club.java @@ -1,6 +1,5 @@ package com.spaceclub.club.domain; -import com.spaceclub.club.controller.dto.ClubGetResponse; import com.spaceclub.global.BaseTimeEntity; import jakarta.persistence.Column; import jakarta.persistence.Entity; @@ -28,19 +27,25 @@ public class Club extends BaseTimeEntity { private Long id; @Column(length = 12, nullable = false) + @Getter private String name; @Lob + @Getter private String image; @Lob + @Getter private String info; + @Getter private String owner; + @Getter @OneToMany(mappedBy = "club") private List notices = new ArrayList<>(); + @Getter @OneToMany(mappedBy = "club") private List clubUser = new ArrayList<>(); @@ -65,18 +70,4 @@ public Club(String name, String image, String info, String owner, List user.getClub().getId().equals(this.id)) - .count(); - - return ClubGetResponse.builder() - .name(name) - .info(info) - .memberCount(memberCount) - .image(image) - .notices(notices) - .build(); - } - } diff --git a/src/test/java/com/spaceclub/club/controller/ClubControllerTest.java b/src/test/java/com/spaceclub/club/controller/ClubControllerTest.java index 76d4564d..b44acffa 100644 --- a/src/test/java/com/spaceclub/club/controller/ClubControllerTest.java +++ b/src/test/java/com/spaceclub/club/controller/ClubControllerTest.java @@ -1,7 +1,7 @@ package com.spaceclub.club.controller; import com.fasterxml.jackson.databind.ObjectMapper; -import com.spaceclub.club.controller.dto.CreateClubRequest; +import com.spaceclub.club.controller.dto.ClubCreateRequest; import com.spaceclub.club.domain.Club; import com.spaceclub.club.domain.ClubNotice; import com.spaceclub.club.service.ClubService; @@ -60,7 +60,7 @@ class ClubControllerTest { .owner("연어대장") .image("연어.png") .build()); - CreateClubRequest request = new CreateClubRequest("연사모", + ClubCreateRequest request = new ClubCreateRequest("연사모", "연어를 사랑하는 모임", "연어대장", "연어.png"); From a3c69cd6ab2ef6a7aba63969b4bdbe7b14f5b45c Mon Sep 17 00:00:00 2001 From: Choi Seongwon Date: Fri, 27 Oct 2023 15:56:25 +0900 Subject: [PATCH 6/6] =?UTF-8?q?chore:=20=EA=B4=84=ED=98=B8=20=EC=9C=84?= =?UTF-8?q?=EC=B9=98=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/spaceclub/club/controller/ClubControllerTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/java/com/spaceclub/club/controller/ClubControllerTest.java b/src/test/java/com/spaceclub/club/controller/ClubControllerTest.java index b44acffa..cd23b560 100644 --- a/src/test/java/com/spaceclub/club/controller/ClubControllerTest.java +++ b/src/test/java/com/spaceclub/club/controller/ClubControllerTest.java @@ -136,7 +136,8 @@ class ClubControllerTest { .andDo(print()) .andDo(document("club/delete", preprocessRequest(prettyPrint()), - preprocessResponse(prettyPrint()))); + preprocessResponse(prettyPrint()) + )); } }