-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
3cd3600
commit 916f7e2
Showing
2 changed files
with
37 additions
and
1 deletion.
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
35 changes: 35 additions & 0 deletions
35
...ule/src/test/kotlin/com/bamyanggang/domainmodule/strongpoint/aggregate/StrongPointTest.kt
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,35 @@ | ||
package com.bamyanggang.domainmodule.strongpoint.aggregate | ||
|
||
import com.bamyanggang.commonmodule.fixture.generateFixture | ||
import com.bamyanggang.domainmodule.domain.strongpoint.aggregate.StrongPoint | ||
import io.kotest.assertions.throwables.shouldThrow | ||
import io.kotest.core.spec.style.FunSpec | ||
import io.kotest.matchers.shouldBe | ||
import java.util.* | ||
|
||
class StrongPointTest: FunSpec({ | ||
val userId: UUID = generateFixture() | ||
|
||
test("역량 키워드 정상 생성 테스트") { | ||
//arange | ||
val name = "역량 키워드" | ||
val newStrongPoint = StrongPoint.create(name, userId) | ||
|
||
newStrongPoint.name shouldBe name | ||
newStrongPoint.userId shouldBe userId | ||
} | ||
|
||
test("이름 공백 역량 키워드 등록 예외 테스트"){ | ||
shouldThrow<IllegalArgumentException> { | ||
StrongPoint.create("", userId) | ||
} | ||
} | ||
|
||
test("역량 키워드 이름 중복 검증 테스트") { | ||
val name = "중복 역량 키워드" | ||
val originStrongPoint = StrongPoint.create(name, userId) | ||
|
||
originStrongPoint.isDuplicated(name) shouldBe true | ||
} | ||
|
||
}) |