From 50ba3883ca2e3f54b34ac0cfb7119e2f58f030f2 Mon Sep 17 00:00:00 2001 From: Mustafa Alsalfiti Date: Tue, 5 Mar 2024 14:36:44 +0100 Subject: [PATCH] fix: part of tests --- .../vc/HoldersCredentialTest.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/test/java/org/eclipse/tractusx/managedidentitywallets/vc/HoldersCredentialTest.java b/src/test/java/org/eclipse/tractusx/managedidentitywallets/vc/HoldersCredentialTest.java index fb0f69a6a..e71fc9407 100644 --- a/src/test/java/org/eclipse/tractusx/managedidentitywallets/vc/HoldersCredentialTest.java +++ b/src/test/java/org/eclipse/tractusx/managedidentitywallets/vc/HoldersCredentialTest.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; +import lombok.SneakyThrows; import org.eclipse.tractusx.managedidentitywallets.ManagedIdentityWalletsApplication; import org.eclipse.tractusx.managedidentitywallets.config.MIWSettings; import org.eclipse.tractusx.managedidentitywallets.config.TestContextInitializer; @@ -66,12 +67,20 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.web.client.TestRestTemplate; -import org.springframework.http.*; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; import org.springframework.test.context.ContextConfiguration; import java.net.URI; import java.time.Instant; -import java.util.*; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; import static org.eclipse.tractusx.managedidentitywallets.constant.StringPool.COLON_SEPARATOR; @@ -286,9 +295,10 @@ void validateCredentialsWithInvalidVC() throws com.fasterxml.jackson.core.JsonPr } + @SneakyThrows @Test @DisplayName("validate VC with date check true, it should return true") - void validateCredentialsWithExpiryCheckTrue() throws com.fasterxml.jackson.core.JsonProcessingException, UnsupportedSignatureTypeException, InvalidPublicKeyFormatException, NoVerificationKeyFoundException, SignatureParseException, DidParseException, SignatureVerificationFailedException, TransformJsonLdException { + void validateCredentialsWithExpiryCheckTrue() { CredentialVerificationRequest request = new CredentialVerificationRequest(); request.setVc(issueVC());