Skip to content

Commit

Permalink
[MOSIO-34112] Adding test cases (#1899)
Browse files Browse the repository at this point in the history
* [MOSIO-34112] Adding test cases

Signed-off-by: khuddus shariff <[email protected]>

---------

Signed-off-by: khuddus shariff <[email protected]>
  • Loading branch information
Khuddusshariff0022 authored Jul 26, 2024
1 parent 69e9bf9 commit d39682f
Show file tree
Hide file tree
Showing 4 changed files with 322 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class BioDedupeConstants {
/** The Constant INTERNAL_ERROR. */
private static final String INTERNAL_ERROR = "Internal error occurred in bio-dedupe stage while processing for registrationId ";

public static final String ABIS_RESPONSE_MATCHING = "ABIS response Details matching, destination stage is UIN";
public static final String BIOMETRIC_MATCH_FOUND_WITH_SELF = "Biometric match found successfully, destination stage is UIN";

public static final String NO_MATCH_FOUND_FOR_UPDATE = "No match found, rejecting the Update packet for ";
}
public static final String BIOMETRIC_MATCH_FOUND_WITH_OTHER = "Biometric match found with other user, rejecting packet for ";
}
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,7 @@ public MessageDTO process(MessageDTO object, String stageName) {
newPacketPreAbisIdentification(registrationStatusDto, object);
} else if (packetStatus.equalsIgnoreCase(AbisConstant.POST_ABIS_IDENTIFICATION)) {
postAbisIdentification(registrationStatusDto, object, registrationType);

}

} else if (registrationType.equalsIgnoreCase(SyncTypeDto.UPDATE.toString())
|| registrationType.equalsIgnoreCase(SyncTypeDto.RES_UPDATE.toString())) {
String packetStatus = abisHandlerUtil.getPacketStatus(registrationStatusDto);
Expand Down Expand Up @@ -444,9 +442,8 @@ private void postAbisIdentification(InternalRegistrationStatusDto registrationSt
updatePostAbisIdentification(registrationStatusDto, object, registrationType, moduleName,
matchedRegIds);
}else {
sendToManualAdjudicationStage(registrationStatusDto, object, registrationType, moduleName, matchedRegIds);

regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(),
sendToManualAdjudicationStage(registrationStatusDto, object, registrationType, moduleName, matchedRegIds);
regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(),
registrationStatusDto.getRegistrationId(), BioDedupeConstants.ABIS_RESPONSE_NOT_NULL);
}
}
Expand Down Expand Up @@ -489,21 +486,21 @@ private void updatePostAbisIdentification(InternalRegistrationStatusDto registra
registrationStatusDto.setSubStatusCode(StatusUtil.BIO_DEDUPE_SUCCESS.getCode());
regProcLogger.info(LoggerFileConstant.SESSIONID.toString(),
LoggerFileConstant.REGISTRATIONID.toString(), registrationStatusDto.getRegistrationId(),
BioDedupeConstants.ABIS_RESPONSE_MATCHING);
BioDedupeConstants.BIOMETRIC_MATCH_FOUND_WITH_SELF);
} else {
if (biometricsUpdateSingleMatchAutoReject) {
registrationStatusDto.setLatestTransactionStatusCode(
RegistrationTransactionStatusCode.FAILED.toString());
object.setIsValid(Boolean.FALSE);
registrationStatusDto.setStatusCode(RegistrationStatusCode.REJECTED.name());
registrationStatusDto
.setStatusComment(StatusUtil.UPDATE_PACKET_BIOMETRICS_NO_MATCH_FOUND.getMessage());
.setStatusComment(StatusUtil. UPDATE_PACKET_BIOMETRICS_MATCHED_WITH_OTHER.getMessage());
registrationStatusDto
.setSubStatusCode(StatusUtil.UPDATE_PACKET_BIOMETRICS_NO_MATCH_FOUND.getCode());
.setSubStatusCode(StatusUtil. UPDATE_PACKET_BIOMETRICS_MATCHED_WITH_OTHER.getCode());
regProcLogger.info(LoggerFileConstant.SESSIONID.toString(),
LoggerFileConstant.REGISTRATIONID.toString(),
registrationStatusDto.getRegistrationId(),
BioDedupeConstants.NO_MATCH_FOUND_FOR_UPDATE
BioDedupeConstants.BIOMETRIC_MATCH_FOUND_WITH_OTHER
+ registrationStatusDto.getRegistrationId());
} else {
sendToManualAdjudicationStage(registrationStatusDto, object, registrationType, moduleName,
Expand Down
Loading

0 comments on commit d39682f

Please sign in to comment.