Skip to content

Commit 3faa3b8

Browse files
chore(internal): add some tests for union classes (#542)
1 parent 1dc4c22 commit 3faa3b8

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// File generated from our OpenAPI spec by Stainless.
2+
3+
package com.lithic.api.models
4+
5+
import org.assertj.core.api.Assertions.assertThat
6+
import org.junit.jupiter.api.Test
7+
8+
internal class AccountHolderUpdateResponseTest {
9+
10+
@Test
11+
fun ofKybKycPatch() {
12+
val kybKycPatch = AccountHolderUpdateResponse.KybKycPatchResponse.builder().build()
13+
14+
val accountHolderUpdateResponse = AccountHolderUpdateResponse.ofKybKycPatch(kybKycPatch)
15+
16+
assertThat(accountHolderUpdateResponse.kybKycPatch()).contains(kybKycPatch)
17+
assertThat(accountHolderUpdateResponse.patch()).isEmpty
18+
}
19+
20+
@Test
21+
fun ofPatch() {
22+
val patch = AccountHolderUpdateResponse.PatchResponse.builder().build()
23+
24+
val accountHolderUpdateResponse = AccountHolderUpdateResponse.ofPatch(patch)
25+
26+
assertThat(accountHolderUpdateResponse.kybKycPatch()).isEmpty
27+
assertThat(accountHolderUpdateResponse.patch()).contains(patch)
28+
}
29+
}

0 commit comments

Comments
 (0)