use of edu.stanford.bmir.protege.web.shared.chgpwd.ResetPasswordResult in project webprotege by protegeproject.
the class ResetPasswordActionHandler_TestCase method shouldReturnSuccessIfEmailAddressComparesEqualIgnoreCase.
@Test
public void shouldReturnSuccessIfEmailAddressComparesEqualIgnoreCase() {
when(userDetailsManager.getUserByUserIdOrEmail(any(String.class))).thenReturn(Optional.of(userId));
when(userDetailsManager.getUserDetails(userId)).thenReturn(Optional.of(userDetails));
when(userDetails.getEmailAddress()).thenReturn(Optional.of(EMAIL_ADDRESS));
ResetPasswordResult result = handler.execute(action, context);
assertThat(result.getResultCode(), is(ResetPasswordResultCode.SUCCESS));
}
Aggregations