use of com.nexblocks.authguard.api.dto.requests.PasswordResetRequestDTO in project AuthGuard by AuthGuard.
the class PasswordResetRequestValidatorTest method validateValidByPasswordWithoutDomain.
@Test
void validateValidByPasswordWithoutDomain() {
final PasswordResetRequestDTO request = PasswordResetRequestDTO.builder().byToken(false).identifier("identifier").oldPassword("oldPassword").newPassword("newPassword").build();
final Validator<PasswordResetRequestDTO> validator = Validators.getForClass(PasswordResetRequestDTO.class);
final List<Violation> violations = validator.validate(request);
assertThat(violations).containsExactly(new Violation("domain", ViolationType.MISSING_REQUIRED_VALUE));
}
Aggregations