You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to mock the AWS Kotlin SDK, but getting an error I cannot figure out. I am trying to stub out the SDK function public suspend inline fun StsClient.getFederationToken(crossinline block: GetFederationTokenRequest.Builder.() -> Unit): GetFederationTokenResponse = getFederationToken(GetFederationTokenRequest.Builder().apply(block).build())
When using any<GetFederationTokenRequest.Builder.() -> Unit>(), I get the error
java.lang.NullPointerException: Cannot invoke "kotlin.jvm.functions.Function1.invoke(Object)" because "block$iv" is null
Can you let me know what I'm doing wrong, or if there is a better way of achieving this?
I am trying to mock the AWS Kotlin SDK, but getting an error I cannot figure out. I am trying to stub out the SDK function
public suspend inline fun StsClient.getFederationToken(crossinline block: GetFederationTokenRequest.Builder.() -> Unit): GetFederationTokenResponse = getFederationToken(GetFederationTokenRequest.Builder().apply(block).build())
When using
any<GetFederationTokenRequest.Builder.() -> Unit>()
, I get the errorCan you let me know what I'm doing wrong, or if there is a better way of achieving this?
Thank you!
build.gradle.kts:
test
The text was updated successfully, but these errors were encountered: