diff --git a/tests/integration-tests/src/test/kotlin/common/errors/CredentialOfferError.kt b/tests/integration-tests/src/test/kotlin/common/errors/CredentialOfferError.kt index 89e7d9d858..0dbd8e6d42 100644 --- a/tests/integration-tests/src/test/kotlin/common/errors/CredentialOfferError.kt +++ b/tests/integration-tests/src/test/kotlin/common/errors/CredentialOfferError.kt @@ -1,23 +1,20 @@ package common.errors -import org.hyperledger.identus.client.models.Connection import org.hyperledger.identus.client.models.CreateIssueCredentialRecordRequest import java.util.UUID enum class CredentialOfferError { UNKNOWN_CONNECTION_ID { - override fun updateCredentialWithError(credentialOffer: CreateIssueCredentialRecordRequest): CreateIssueCredentialRecordRequest { - return CreateIssueCredentialRecordRequest( - schemaId = credentialOffer.schemaId, - claims = credentialOffer.claims, - issuingDID = credentialOffer.issuingDID, - issuingKid = credentialOffer.issuingKid, - connectionId = UUID.randomUUID(), - validityPeriod = credentialOffer.validityPeriod, - credentialFormat = credentialOffer.credentialFormat, - automaticIssuance = credentialOffer.automaticIssuance, - ) - } + override fun updateCredentialWithError(credentialOffer: CreateIssueCredentialRecordRequest): CreateIssueCredentialRecordRequest = CreateIssueCredentialRecordRequest( + schemaId = credentialOffer.schemaId, + claims = credentialOffer.claims, + issuingDID = credentialOffer.issuingDID, + issuingKid = credentialOffer.issuingKid, + connectionId = UUID.randomUUID(), + validityPeriod = credentialOffer.validityPeriod, + credentialFormat = credentialOffer.credentialFormat, + automaticIssuance = credentialOffer.automaticIssuance, + ) }, ; abstract fun updateCredentialWithError(credentialOffer: CreateIssueCredentialRecordRequest): CreateIssueCredentialRecordRequest diff --git a/tests/integration-tests/src/test/kotlin/common/errors/SchemaTemplateError.kt b/tests/integration-tests/src/test/kotlin/common/errors/SchemaTemplateError.kt index 9ab3797698..c75159952d 100644 --- a/tests/integration-tests/src/test/kotlin/common/errors/SchemaTemplateError.kt +++ b/tests/integration-tests/src/test/kotlin/common/errors/SchemaTemplateError.kt @@ -7,8 +7,7 @@ import net.serenitybdd.screenplay.Actor enum class SchemaTemplateError { TYPE_AND_PROPERTIES_WITHOUT_SCHEMA_TYPE { - override fun inner_schema(): String { - return """ + override fun inner_schema(): String = """ { "type": "object", "properties": { @@ -21,12 +20,10 @@ enum class SchemaTemplateError { }, "required": ["name"] } - """.trimIndent() - } + """.trimIndent() }, CUSTOM_WORDS_NOT_DEFINED { - override fun inner_schema(): String { - return """ + override fun inner_schema(): String = """ { "${"$"}schema": "http://json-schema.org/draft-2020-12/schema#", "type": "object", @@ -40,12 +37,10 @@ enum class SchemaTemplateError { }, "customKeyword": "value" } - """.trimIndent() - } + """.trimIndent() }, MISSING_REQUIRED_FOR_MANDATORY_PROPERTY { - override fun inner_schema(): String { - return """ + override fun inner_schema(): String = """ { "${"$"}schema": "http://json-schema.org/draft-2020-12/schema#", "type": "object", @@ -59,7 +54,6 @@ enum class SchemaTemplateError { } } """ - } }, ; abstract fun inner_schema(): String diff --git a/tests/integration-tests/src/test/kotlin/steps/credentials/JwtCredentialSteps.kt b/tests/integration-tests/src/test/kotlin/steps/credentials/JwtCredentialSteps.kt index f599f5c85a..4e2481724d 100644 --- a/tests/integration-tests/src/test/kotlin/steps/credentials/JwtCredentialSteps.kt +++ b/tests/integration-tests/src/test/kotlin/steps/credentials/JwtCredentialSteps.kt @@ -138,7 +138,7 @@ class JwtCredentialSteps { fun issuerIssuesTheJwtCredentialWithIssue( issuer: Actor, holder: Actor, - credentialOfferError: CredentialOfferError + credentialOfferError: CredentialOfferError, ) { val credentialOfferRequest = CreateIssueCredentialRecordRequest( claims = linkedMapOf(