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