Skip to content

Commit

Permalink
[MOSIP-23229] Auth type validation case insensitive taken care (#1139)
Browse files Browse the repository at this point in the history
* Added the string lower case function to avoid error throwing while comparing

Signed-off-by: Aravindhan Alagesan <[email protected]>

* Added the string lower case function to avoid error throwing while comparing

Signed-off-by: Aravindhan Alagesan <[email protected]>

* Added the string lower case function to avoid error throwing while comparing

Signed-off-by: Aravindhan Alagesan <[email protected]>

* Added the condition to validate unlockfor second param to avoid confusion incase of authentication locked

Signed-off-by: Aravindhan Alagesan <[email protected]>

* Added the condition to validate unlockfor second param to avoid confusion incase of authentication locked

Signed-off-by: Aravindhan Alagesan <[email protected]>

* Added the condition to validate unlockfor second param to avoid confusion incase of authentication locked

Signed-off-by: Aravindhan Alagesan <[email protected]>

* Added the condition to validate unlockfor second param to avoid confusion incase of authentication locked

Signed-off-by: Aravindhan Alagesan <[email protected]>

* Changes in test cases based on field name changes

Signed-off-by: Aravindhan Alagesan <[email protected]>

* Added the condition to validate unlockfor second param to avoid confusion incase of authentication locked

Signed-off-by: Aravindhan Alagesan <[email protected]>

---------

Signed-off-by: Aravindhan Alagesan <[email protected]>
  • Loading branch information
aranaravi authored Nov 2, 2023
1 parent b1535db commit 456461b
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1410,11 +1410,11 @@ public void testValidateAuthLockRequestV2NegativeUnlockForSeconds() throws Excep
requestWrapper.setVersion("1.0");
requestWrapper.setRequest(authLockOrUnLockRequestDtoV2);
try {
requestValidator.validateAuthLockOrUnlockRequestV2(requestWrapper);
} catch (BaseResidentUncheckedExceptionWithMetadata e) {
assertEquals(e.getErrorCode(),ResidentErrorCode.UNSUPPORTED_INPUT.getErrorCode());
return;
}
requestValidator.validateAuthLockOrUnlockRequestV2(requestWrapper);
} catch (BaseResidentUncheckedExceptionWithMetadata e) {
assertEquals(e.getErrorCode(),ResidentErrorCode.UNSUPPORTED_INPUT.getErrorCode());
return;
}
fail();
}

Expand Down Expand Up @@ -3205,10 +3205,10 @@ public void testValidateAuthLockOrUnlockRequestV2FailedUnlockSeconds() throws Ex
requestWrapper.setRequest(authLockOrUnLockRequestDtoV2);
try {
requestValidator.validateAuthLockOrUnlockRequestV2(requestWrapper);
} catch (BaseResidentUncheckedExceptionWithMetadata e) {
assertEquals(e.getErrorCode(),ResidentErrorCode.UNSUPPORTED_INPUT.getErrorCode());
return;
}
} catch (BaseResidentUncheckedExceptionWithMetadata e) {
assertEquals(e.getErrorCode(),ResidentErrorCode.UNSUPPORTED_INPUT.getErrorCode());
return;
}
fail();
}
}
}

0 comments on commit 456461b

Please sign in to comment.