Skip to content

Instantly share code, notes, and snippets.

@jaimedantas
Created April 1, 2021 00:11
Show Gist options
  • Save jaimedantas/593f3270eb08fd655bb44b34fffafdf0 to your computer and use it in GitHub Desktop.
Save jaimedantas/593f3270eb08fd655bb44b34fffafdf0 to your computer and use it in GitHub Desktop.
@MicronautTest
internal class ResourceValidatorTest{
@Test
internal fun shouldValidateIdAsValidUUID() {
val validator: Validator<Resource> = ResourceValidator()
val resource = Resource(UUID.randomUUID().toString())
val result: ValidationResult = validator.validate(resource)
assertTrue(result.isValid())
assertTrue(result.getErrors().isEmpty());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment