Skip to content

Commit

Permalink
- Add junit test
Browse files Browse the repository at this point in the history
  • Loading branch information
rathnapandi committed Oct 31, 2024
1 parent 442dcdc commit 3bf3931
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -391,4 +391,18 @@ public void createHttpEntity() throws JsonProcessingException {
HttpEntity entity = clientAppAdapter.createHttpEntity(filter, clientAppOauthResource);
Assert.assertNotNull(entity);
}

@Test
public void addAPIAccess() throws JsonProcessingException {
String credentialId = "1234";
ClientApplication clientApplication = new ClientApplication();
clientApplication.setName("test");
clientApplication.setId("1d2aeeca-2716-449e-a7a0-5d7213dbcbaf");
ClientAppCredential clientAppCredential = new ExtClients();
clientAppCredential.setId(credentialId);
List<ClientAppCredential> credentials = new ArrayList<>();
credentials.add(clientAppCredential);
clientApplication.setCredentials(credentials);
clientAppAdapter.addAPIAccess(clientApplication, true);
}
}

0 comments on commit 3bf3931

Please sign in to comment.