Skip to content

Commit

Permalink
updated the code based on review comments
Browse files Browse the repository at this point in the history
Signed-off-by: dhanendra06 <[email protected]>
  • Loading branch information
dhanendra06 committed Apr 1, 2024
1 parent 11e2025 commit fbde50d
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,15 +306,15 @@ public void testPublishIdentitySchemaWithException() throws Exception {

@Test
@WithUserDetails("global-admin")
public void deleteIdentitySchema_withValidRid_recordDeleted() throws Exception {
String rid="123456789";
Mockito.when(identitySchemaRepository.findIdentitySchemaById(rid)).thenReturn(draftSchema);
assertEquals(rid,identitySchemaService.deleteSchema(rid));
public void deleteIdentitySchema_withValidId_recordDeleted() throws Exception {
String id="123456789";
Mockito.when(identitySchemaRepository.findIdentitySchemaById(id)).thenReturn(draftSchema);
assertEquals(id,identitySchemaService.deleteSchema(id));
}

@Test(expected = RequestException.class)
@WithUserDetails("global-admin")
public void deleteIdentitySchema_invalidRid_failedToDelete() throws Exception {
public void deleteIdentitySchema_invalidId_failedToDelete() throws Exception {
Mockito.when(identitySchemaRepository.deleteIdentitySchema(Mockito.anyString(), Mockito.any(LocalDateTime.class),
Mockito.anyString())).thenReturn(0);
identitySchemaService.deleteSchema("test-test");
Expand Down

0 comments on commit fbde50d

Please sign in to comment.