-
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.
* refactor: Member Name null입력시 NPE로 변경 * feat: Schedule Name 필드의 null 검증 추가
- Loading branch information
Showing
4 changed files
with
39 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
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
21 changes: 21 additions & 0 deletions
21
backend/src/test/java/team/teamby/teambyteam/schedule/domain/NameTest.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,21 @@ | ||
package team.teamby.teambyteam.schedule.domain; | ||
|
||
import org.junit.jupiter.api.DisplayName; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.assertj.core.api.Assertions.assertThatThrownBy; | ||
|
||
class NameTest { | ||
|
||
@Test | ||
@DisplayName("일정의 이름이 null이 되면 예외가 발생한다.") | ||
void failNameNull() { | ||
// given | ||
final String nullName = null; | ||
|
||
// when & then | ||
assertThatThrownBy(() -> new Name(nullName)) | ||
.isInstanceOf(NullPointerException.class) | ||
.hasMessage("일정의 이름은 null일 수 없습니다."); | ||
} | ||
} |
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