Merge branch 'main' into learn-with-making-clean-architecture

This commit is contained in:
Colt
2022-04-26 20:57:09 +09:00
committed by GitHub
2 changed files with 25 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
package com.banjjoknim.cleanarchitecture.user.pojo
import org.junit.jupiter.api.DisplayName
import org.junit.jupiter.api.Nested
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.assertDoesNotThrow
import org.junit.jupiter.api.assertThrows
class NicknameTest {
@DisplayName("닉네임 생성 테스트")
@Nested
inner class ChangeNicknameTestCases {
@Test
fun `10글자 이내이면 닉네임을 생성할 수 있다`() {
assertDoesNotThrow { Nickname("banjjoknim") }
}
@Test
fun `10글자가 넘으면 닉네임을 생성할 경우 예외가 발생한다`() {
assertThrows<IllegalArgumentException> { Nickname("i'm banjjoknim") }
}
}
}

View File

@@ -7,6 +7,7 @@ import org.junit.jupiter.api.Test
class UserTest {
@DisplayName("회원 닉네임 변경 테스트 케이스")
@Nested
inner class ChangeNicknameTestCases {