-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/refactor/143-written-checklist-r…
…ead' into dev-be # Conflicts: # backend/bang-ggood/src/main/java/com/bang_ggood/category/dto/response/CategoryQuestionsResponse.java # backend/bang-ggood/src/main/java/com/bang_ggood/category/dto/response/WrittenCategoryQuestionsResponse.java # backend/bang-ggood/src/main/java/com/bang_ggood/checklist/controller/ChecklistController.java # backend/bang-ggood/src/main/java/com/bang_ggood/checklist/dto/response/ChecklistQuestionsResponse.java # backend/bang-ggood/src/main/java/com/bang_ggood/checklist/dto/response/QuestionResponse.java # backend/bang-ggood/src/main/java/com/bang_ggood/checklist/dto/response/WrittenChecklistResponse.java # backend/bang-ggood/src/main/java/com/bang_ggood/checklist/dto/response/WrittenQuestionResponse.java # backend/bang-ggood/src/main/java/com/bang_ggood/checklist/service/ChecklistService.java # backend/bang-ggood/src/main/resources/schema.sql # backend/bang-ggood/src/test/java/com/bang_ggood/checklist/ChecklistFixture.java # backend/bang-ggood/src/test/java/com/bang_ggood/checklist/controller/ChecklistE2ETest.java # backend/bang-ggood/src/test/java/com/bang_ggood/checklist/service/ChecklistServiceTest.java # backend/bang-ggood/src/test/resources/schema-test.sql
- Loading branch information
Showing
18 changed files
with
203 additions
and
28 deletions.
There are no files selected for viewing
13 changes: 12 additions & 1 deletion
13
.../src/main/java/com/bang_ggood/category/dto/response/WrittenCategoryQuestionsResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,18 @@ | ||
package com.bang_ggood.category.dto.response; | ||
|
||
import com.bang_ggood.category.domain.Category; | ||
import com.bang_ggood.checklist.dto.response.WrittenQuestionResponse; | ||
|
||
import java.util.List; | ||
|
||
public record WrittenCategoryQuestionsResponse(Integer categoryId, String categoryName, List<WrittenQuestionResponse> questions) { | ||
public record WrittenCategoryQuestionsResponse(Integer categoryId, String categoryName, | ||
List<WrittenQuestionResponse> questions) { | ||
|
||
public static WrittenCategoryQuestionsResponse of(Category category, List<WrittenQuestionResponse> questions) { | ||
return new WrittenCategoryQuestionsResponse( | ||
category.getId(), | ||
category.getName(), | ||
questions | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...bang-ggood/src/main/java/com/bang_ggood/checklist/dto/request/ChecklistCreateRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
.../src/main/java/com/bang_ggood/checklist/dto/response/ChecklistComparisonReadResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...ood/src/main/java/com/bang_ggood/checklist/dto/response/UserChecklistPreviewResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...ng-ggood/src/main/java/com/bang_ggood/checklist/dto/response/WrittenQuestionResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,15 @@ | ||
package com.bang_ggood.checklist.dto.response; | ||
|
||
import com.bang_ggood.checklist.domain.ChecklistQuestion; | ||
|
||
public record WrittenQuestionResponse(Integer questionId, String title, String subtitle, String answer) { | ||
|
||
public static WrittenQuestionResponse of(ChecklistQuestion checklistQuestion) { | ||
return new WrittenQuestionResponse( | ||
checklistQuestion.getQuestion().getId(), | ||
checklistQuestion.getQuestion().getTitle(), | ||
checklistQuestion.getQuestion().getSubtitle(), | ||
checklistQuestion.getGrade().name() | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 0 additions & 13 deletions
13
backend/bang-ggood/src/main/java/com/bang_ggood/room/dto/WrittenRoomResponse.java
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...ang_ggood/room/dto/RoomCreateRequest.java → ...d/room/dto/request/RoomCreateRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
backend/bang-ggood/src/main/java/com/bang_ggood/room/dto/response/WrittenRoomResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.bang_ggood.room.dto.response; | ||
|
||
import com.bang_ggood.checklist.domain.Checklist; | ||
|
||
public record WrittenRoomResponse(String name, Integer deposit, Integer rent, Integer contractTerm, Integer floor, | ||
String address, String station, Integer walkingTime, String realEstate) { | ||
|
||
public static WrittenRoomResponse of(Checklist checklist) { | ||
return new WrittenRoomResponse(checklist.getRoomName(), checklist.getDeposit(), checklist.getRent(), | ||
checklist.getContractTerm(), checklist.getRoomFloor(), checklist.getRoomAddress(), | ||
checklist.getRoomStation(), checklist.getRoomWalkingTime(), checklist.getRealEstate()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
backend/bang-ggood/src/test/java/com/bang_ggood/checklist/ChecklistFixture.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
backend/bang-ggood/src/test/java/com/bang_ggood/checklist/option/OptionTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.bang_ggood.checklist.option; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import com.bang_ggood.checklist.domain.Option; | ||
import org.junit.jupiter.api.DisplayName; | ||
import org.junit.jupiter.api.Test; | ||
|
||
class OptionTest { | ||
|
||
@DisplayName("옵션 포함 성공: 포함하는 경우") | ||
@Test | ||
void contains_true() { | ||
assertThat(Option.contains(1)).isTrue(); | ||
} | ||
|
||
@DisplayName("옵션 포함 성공 : 포함하지 않는 경우") | ||
@Test | ||
void contains_false() { | ||
assertThat(Option.contains(9999)).isFalse(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 6 additions & 1 deletion
7
backend/bang-ggood/src/test/java/com/bang_ggood/room/RoomFixture.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters