diff --git a/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/utils/TestUtils.java b/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/utils/TestUtils.java index 71a0d980..c86086cf 100644 --- a/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/utils/TestUtils.java +++ b/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/utils/TestUtils.java @@ -154,7 +154,6 @@ public static Wallet getWalletFromString(String body) throws JsonProcessingExcep } wallet1.setVerifiableCredentials(verifiableCredentials); } - System.out.println("wallet -- >" + wallet1.getBpn()); return wallet1; } diff --git a/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/vp/PresentationTest.java b/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/vp/PresentationTest.java index 1546ddb7..8d489f40 100644 --- a/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/vp/PresentationTest.java +++ b/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/vp/PresentationTest.java @@ -67,6 +67,7 @@ import java.net.URI; import java.text.ParseException; import java.time.Instant; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -272,8 +273,14 @@ private Map getIssueVPRequest(String bpn) throws JsonProcessingE Wallet wallet = TestUtils.getWalletFromString(response.getBody()); //get BPN credentials - //TODO need to get some VCs for testing - List credentials = null; + List vcs = new ArrayList<>(); + List typesOfVcs = List.of("Type1", "Type2", "Type3"); + + typesOfVcs.forEach(type -> { + VerifiableCredential verifiableCredential = TestUtils.issueCustomVCUsingBaseWallet(wallet.getDid(), miwSettings.authorityWalletDid(), type, AuthenticationUtils.getValidUserHttpHeaders(miwSettings.authorityWalletBpn()), miwSettings, objectMapper, restTemplate); + vcs.add(verifiableCredential); + }); + List credentials = holdersCredentialRepository.getByHolderDid(wallet.getDid()); Map map = objectMapper.readValue(credentials.get(0).getData().toJson(), Map.class); @@ -323,9 +330,8 @@ private ResponseEntity issueVC(String bpn, String holderDid, String issu new VerifiableCredentialBuilder(); //VC Subject - VerifiableCredentialSubject verifiableCredentialSubject = new VerifiableCredentialSubject(Map.of(StringPool.TYPE, "BpnCredentials", - StringPool.ID, holderDid, - StringPool.BPN, bpn)); + VerifiableCredentialSubject verifiableCredentialSubject = new VerifiableCredentialSubject(Map.of(StringPool.TYPE, "CustomType", + StringPool.ID, holderDid)); //Using Builder VerifiableCredential credentialWithoutProof =