Skip to content

Commit

Permalink
test case modification commented changes
Browse files Browse the repository at this point in the history
Signed-off-by: khuddus shariff <[email protected]>
  • Loading branch information
Khuddusshariff0022 committed Aug 3, 2024
1 parent ed58bff commit 11e3ed1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@ private void handlePostAbisIdentificationForUpdate(InternalRegistrationStatusDto
sendToManualAdjudicationStage(registrationStatusDto, object, registrationType, moduleName,
matchedRegIds);
} else {
//Single match of uin found which is different from update packet uin.
if (biometricsUpdateSingleMatchAutoReject) {
registrationStatusDto.setLatestTransactionStatusCode(
RegistrationTransactionStatusCode.FAILED.toString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -724,25 +724,6 @@ public void noMatchedRidFound() throws ApisResourceAccessException, IOException,
assertTrue(messageDto.getIsValid());
assertFalse(messageDto.getInternalError());
}

@Test
public void noMatchedRidFoundMatchedRidAsNull() throws ApisResourceAccessException, IOException,
PacketDecryptionFailureException, io.mosip.kernel.core.exception.IOException, JsonProcessingException, PacketManagerException {
registrationStatusDto.setRegistrationId("27847657360002520190320095011");
registrationStatusDto.setRegistrationType("UPDATE");
registrationStatusDto.setStatusCode("PROCESSING");
Mockito.when(registrationStatusService.getRegistrationStatus(any(),any(),any(), any())).thenReturn(registrationStatusDto);
Mockito.when(abisHandlerUtil.getPacketStatus(any())).thenReturn(AbisConstant.POST_ABIS_IDENTIFICATION);
Set<String> matchedRidList = null;
Mockito.when(abisHandlerUtil.getUniqueRegIds(any(), any(), anyInt(), any(), any())).thenReturn(matchedRidList);
ArgumentCaptor<InternalRegistrationStatusDto> argumentCaptor = ArgumentCaptor.forClass(InternalRegistrationStatusDto.class);
MessageDTO messageDto = bioDedupeProcessor.process(dto, stageName);
Mockito.verify(registrationStatusService).updateRegistrationStatus(argumentCaptor.capture(),anyString(),anyString());
Assert.assertEquals(argumentCaptor.getValue().getStatusCode(), RegistrationStatusCode.FAILED.name());
Assert.assertEquals(argumentCaptor.getValue().getStatusComment(),"Unknown exception occured null");
assertFalse(messageDto.getIsValid());
assertTrue(messageDto.getInternalError());
}
/*
(when registration.processor.biometrics-update.single-match.auto-reject.enabled = true)
use case 3 -> One match of RID/AID found at bio dedupe, but UIN of the duplicate match is different from update packet UIN when AutoReject is True
Expand Down

0 comments on commit 11e3ed1

Please sign in to comment.