@@ -6,6 +6,7 @@ import io.kotest.core.annotation.DisplayName
66import io.kotest.core.spec.style.DescribeSpec
77import io.kotest.matchers.equality.shouldBeEqualToComparingFields
88import io.kotest.matchers.equals.shouldBeEqual
9+ import io.kotest.matchers.shouldBe
910import org.rooftop.netx.api.Orchestrator
1011import org.rooftop.netx.api.TypeReference
1112import org.rooftop.netx.meta.EnableSaga
@@ -36,7 +37,8 @@ internal class OrchestratorTest(
3637 @Qualifier(" contextOrchestrator" ) private val contextOrchestrator : Orchestrator <String , String >,
3738 @Qualifier(" pairOrchestrator" ) private val pairOrchestrator : Orchestrator <String , Pair <Foo , Foo >>,
3839 @Qualifier(" startWithContextOrchestrator" ) private val startWithContextOrchestrator : Orchestrator <String , String >,
39- @Qualifier(" fooContextOrchestrator" ) private val fooContextOrchestrator : Orchestrator <String , List <Foo >>
40+ @Qualifier(" fooContextOrchestrator" ) private val fooContextOrchestrator : Orchestrator <String , List <Foo >>,
41+ private val privateOrchestrator : Orchestrator <Private , Private >,
4042) : DescribeSpec({
4143
4244 describe("numberOrchestrator 구현채는") {
@@ -210,6 +212,19 @@ internal class OrchestratorTest(
210212 }
211213 }
212214 }
215+
216+ describe("privateFieldOrchestrator 구현채는") {
217+ context("saga 메소드가 호출되면,") {
218+ val private = Private ("I 'm private")
219+
220+ it("Private 필드가 포함된 객체를 반환한다.") {
221+ val result = privateOrchestrator.sagaSync(private)
222+
223+ result.isSuccess shouldBeEqual true
224+ result.decodeResultOrThrow(Private ::class) shouldBeEqual private
225+ }
226+ }
227+ }
213228}) {
214229 data class Home (
215230 val address : String ,
@@ -228,6 +243,8 @@ internal class OrchestratorTest(
228243
229244 data class Foo (val name : String )
230245
246+ data class Private (private val name : String )
247+
231248 companion object {
232249 val rollbackOrchestratorResult = mutableListOf<String >()
233250 val upChainResult = mutableListOf<String >()
0 commit comments