Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nitin-vavdiya committed Sep 6, 2024
1 parent 65dd812 commit df62fcc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ public static Map<String, Object> getCredentialAsMap(String holderBpn, String ho
public static VerifiableCredentialStatusList2021Entry getStatusListEntry(int index) {
return new VerifiableCredentialStatusList2021Entry(Map.of(
"id", "https://example.com/credentials/bpn123456789000/revocation/3#" + index,
"type", "BitstringStatusListEntry",
"type", "StatusList2021Entry",
"statusPurpose", "revocation",
"statusListIndex", String.valueOf(index),
"statusListCredential", "https://example.com/credentials/bpn123456789000/revocation/3"
Expand All @@ -291,7 +291,7 @@ public static VerifiableCredentialStatusList2021Entry getStatusListEntry() {
int index = RandomUtils.nextInt(1, 100);
return new VerifiableCredentialStatusList2021Entry(Map.of(
"id", "https://example.com/credentials/bpn123456789000/revocation/3#" + index,
"type", "BitstringStatusListEntry",
"type", "StatusList2021Entry",
"statusPurpose", "revocation",
"statusListIndex", String.valueOf(index),
"statusListCredential", "https://example.com/credentials/bpn123456789000/revocation/3"
Expand All @@ -318,7 +318,7 @@ public static void mockGetStatusListVC(RevocationClient revocationClient, Object
String vcString = """
{
"type": [
"VerifiableCredential"
"VerifiableCredential","StatusList2021Credential"
],
"@context": [
"https://www.w3.org/2018/credentials/v1",
Expand All @@ -338,7 +338,7 @@ public static void mockGetStatusListVC(RevocationClient revocationClient, Object
},
"credentialSubject": {
"id": "did:key:z6MkhGTzcvb8BXh5aeoaFvb3XJ3MBmfLRamdYdXyV1pxJBce",
"type": "BitstringStatusList",
"type": "StatusList2021",
"statusPurpose": "revocation",
"encodedList": "##encodedList"
}
Expand Down Expand Up @@ -377,7 +377,7 @@ public static void mockGetStatusListVC(RevocationClient revocationClient, Object
},
"credentialSubject": {
"id": "did:key:z6MkhGTzcvb8BXh5aeoaFvb3XJ3MBmfLRamdYdXyV1pxJBce",
"type": "StatusList2021Credential",
"type": "StatusList2021",
"statusPurpose": "revocation",
"encodedList": "H4sIAAAAAAAA/+3BMQEAAAjAoEqzfzk/SwjUmQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIDXFiqoX4AAAAIA"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ void testSignStatusListVC_Success() {
tokenResponse.setAccessToken("123456");
wm1.stubFor(post("/token").willReturn(jsonResponse(tokenResponse, 200)));
wm1.stubFor(
post("/api/credentials?revocable=false")
post("/api/credentials?revocable=false&asJwt=false")
.willReturn(jsonResponse(statusListCredential.getCredential(), 200)));
VerifiableCredential signedCredential =
assertDoesNotThrow(
Expand Down

0 comments on commit df62fcc

Please sign in to comment.