-
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
065c0d7
commit f38ed47
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
.../test/kotlin/com/bamyanggang/domainmodule/domain/strongpoint/service/KeywordReaderTest.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,28 @@ | ||
package com.bamyanggang.domainmodule.domain.strongpoint.service | ||
|
||
import com.bamyanggang.domainmodule.domain.strongpoint.repository.KeywordRepository | ||
import io.kotest.core.spec.style.BehaviorSpec | ||
import io.mockk.mockk | ||
import io.mockk.verify | ||
import java.util.* | ||
|
||
class KeywordReaderTest : BehaviorSpec({ | ||
val keywordRepository = mockk<KeywordRepository>(relaxed = true) | ||
val keywordReader = KeywordReader(keywordRepository) | ||
|
||
Given("기본 역량 키워드 id 배열이 주어졌을 때") { | ||
val defaultStrongPoints = arrayListOf( | ||
UUID.randomUUID(), | ||
UUID.randomUUID(), | ||
UUID.randomUUID() | ||
) | ||
|
||
When("KeywordReader.readByIds 함수가 호출되면") { | ||
keywordReader.readByIds(defaultStrongPoints) | ||
|
||
Then("keywordRepository.findByIds 함수가 호출된다.") { | ||
verify { keywordRepository.findByIds(defaultStrongPoints) } | ||
} | ||
} | ||
} | ||
}) |