-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
50 additions
and
2 deletions.
There are no files selected for viewing
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
41 changes: 41 additions & 0 deletions
41
src/test/java/com/moabam/api/domain/entity/CertificationTest.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,41 @@ | ||
package com.moabam.api.domain.entity; | ||
|
||
import static org.assertj.core.api.Assertions.*; | ||
|
||
import org.junit.jupiter.api.DisplayName; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import com.moabam.api.domain.entity.enums.RoomType; | ||
|
||
class CertificationTest { | ||
|
||
String content = "물 마시기"; | ||
String image = "https://s3.testtest"; | ||
|
||
@DisplayName("Certification 생성 성공") | ||
@Test | ||
void create_certification_success() { | ||
Room room = Room.builder() | ||
.title("앵윤이의 방") | ||
.roomType(RoomType.MORNING) | ||
.certifyTime(10) | ||
.maxUserCount(9) | ||
.build(); | ||
|
||
Routine routine = Routine.builder() | ||
.room(room) | ||
.content(content) | ||
.build(); | ||
|
||
assertThatNoException().isThrownBy(() -> { | ||
Certification certification = Certification.builder() | ||
.routine(routine) | ||
.memberId(1L) | ||
.image(image).build(); | ||
|
||
assertThat(certification.getImage()).isEqualTo(image); | ||
assertThat(certification.getMemberId()).isEqualTo(1L); | ||
assertThat(certification.getRoutine()).isEqualTo(routine); | ||
}); | ||
} | ||
} |
3 changes: 1 addition & 2 deletions
3
...ava/com/moabam/api/domain/MemberTest.java → .../moabam/api/domain/entity/MemberTest.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