Skip to content

Commit

Permalink
modified initialize_ValidDetails_ThenPass test now locating Insurance…
Browse files Browse the repository at this point in the history
…Credential.json with classpath

Signed-off-by: Mohd Kaif Siddique <[email protected]>
  • Loading branch information
Mohd Kaif Siddique authored and pvsaidurga committed Apr 5, 2024
1 parent 7e9a7f2 commit 3a78a06
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.springframework.web.client.RestTemplate;

import java.io.File;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
Expand Down Expand Up @@ -261,12 +262,16 @@ public void getVerifiableCredentialWithLinkedDataProof_InValidCredentialDetails_

@Test
public void initialize_ValidDetails_ThenPass() throws VCIExchangeException {
File file = new File("src/test/resources/InsuranceCredential.json");
String credentialPath = "file:/" + file.getAbsolutePath();
URL credentialUrl = getClass().getClassLoader().getResource("InsuranceCredential.json");
if (credentialUrl == null) {
throw new VCIExchangeException("InsuranceCredential.json not found in classpath");
}
String credentialPath = credentialUrl.toString();
Mockito.when(environment.getProperty(Mockito.anyString())).thenReturn(credentialPath);
sunbirdRCVCIssuancePlugin.initialize();
}


@Test
public void initialize_InValidPropertyDetails_ThenPass() {

Expand Down

0 comments on commit 3a78a06

Please sign in to comment.