Skip to content

Commit

Permalink
Fix variable names in test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
n0900 committed Oct 2, 2024
1 parent 50fb66a commit 536046a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
@file:UseSerializers(JwsSignedSerializer::class, UrlSerializer::class)

package at.asitplus.wallet.lib.oidc


import at.asitplus.catching
import at.asitplus.dif.rqes.UrlSerializer
import at.asitplus.dif.rqes.Serializer.UrlSerializer
import at.asitplus.openid.AuthenticationRequestParameters
import at.asitplus.signum.indispensable.josef.JwsSigned
import io.ktor.http.*
Expand All @@ -30,13 +28,15 @@ sealed class AuthenticationRequestParametersFrom {
@Serializable
@SerialName("JwsSigned")
data class JwsSigned(
@Serializable(JwsSignedSerializer::class)
val jwsSigned: at.asitplus.signum.indispensable.josef.JwsSigned,
override val parameters: AuthenticationRequestParameters,
) : AuthenticationRequestParametersFrom()

@Serializable
@SerialName("Uri")
data class Uri(
@Serializable(UrlSerializer::class)
val url: Url,
override val parameters: AuthenticationRequestParameters,
) : AuthenticationRequestParametersFrom()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class OAuth2ClientTest : FunSpec({
authorization = OAuth2Client.AuthorizationForToken.PreAuthCode(preAuth),
)
val token = server.token(tokenRequest).getOrThrow()
token.authorizationDetails.shouldBeNull()
token.authorizationDetailsList.shouldBeNull()
}

test("process with pre-authorized code, can't use it twice") {
Expand Down Expand Up @@ -71,7 +71,7 @@ class OAuth2ClientTest : FunSpec({
authorization = OAuth2Client.AuthorizationForToken.Code(code),
)
val token = server.token(tokenRequest).getOrThrow()
token.authorizationDetails.shouldBeNull()
token.authorizationDetailsList.shouldBeNull()
}

})
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ class OidvciInteropTest : FunSpec({
)
)
val token = authorizationService.token(tokenRequest).getOrThrow()
token.authorizationDetails.shouldNotBeNull()
val first = token.authorizationDetails!!.first().shouldBeInstanceOf<AuthorizationDetails.OpenIdCredential>()
token.authorizationDetailsList.shouldNotBeNull()
val first = token.authorizationDetailsList!!.first().shouldBeInstanceOf<AuthorizationDetails.OpenIdCredential>()
val credentialRequest = client.createCredentialRequest(
input = WalletService.CredentialRequestInput.CredentialIdentifier(first.credentialConfigurationId!!),
clientNonce = token.clientNonce,
Expand Down Expand Up @@ -265,7 +265,7 @@ class OidvciInteropTest : FunSpec({
authorizationDetails = authorizationDetails
)
val token = authorizationService.token(tokenRequest).getOrThrow()
token.authorizationDetails.shouldNotBeNull()
token.authorizationDetailsList.shouldNotBeNull()
val credentialRequest = client.createCredentialRequest(
input = WalletService.CredentialRequestInput.RequestOptions(requestOptions),
clientNonce = token.clientNonce,
Expand Down Expand Up @@ -297,7 +297,7 @@ class OidvciInteropTest : FunSpec({
resource = issuer.metadata.credentialIssuer,
)
val token = authorizationService.token(tokenRequest).getOrThrow()
token.authorizationDetails.shouldBeNull()
token.authorizationDetailsList.shouldBeNull()

val credentialRequest = client.createCredentialRequest(
input = WalletService.CredentialRequestInput.Format(supportedCredentialFormat),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ class OidvciProcessTest : FunSpec({
)
)
val token = authorizationService.token(tokenRequest).getOrThrow()
token.authorizationDetails.shouldNotBeNull()
val first = token.authorizationDetails!!.first().shouldBeInstanceOf<AuthorizationDetails.OpenIdCredential>()
token.authorizationDetailsList.shouldNotBeNull()
val first = token.authorizationDetailsList!!.first().shouldBeInstanceOf<AuthorizationDetails.OpenIdCredential>()
val credentialRequest = client.createCredentialRequest(
input = WalletService.CredentialRequestInput.CredentialIdentifier(first.credentialConfigurationId!!),
clientNonce = token.clientNonce,
Expand Down

0 comments on commit 536046a

Please sign in to comment.