Skip to content
Snippets Groups Projects
Commit 694390d0 authored by michaelisvy's avatar michaelisvy
Browse files

migrated assertion to assertJ

parent 38a5b28e
No related branches found
No related tags found
No related merge requests found
......@@ -8,8 +8,6 @@ import java.util.Set;
import javax.validation.ConstraintViolation;
import javax.validation.Validator;
import org.assertj.core.api.Assertions;
import org.junit.Assert;
import org.junit.Test;
import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
......@@ -40,7 +38,7 @@ public class ValidatorTests {
Validator validator = createValidator();
Set<ConstraintViolation<Person>> constraintViolations = validator.validate(person);
Assert.assertEquals(1, constraintViolations.size());
assertThat(constraintViolations.size()).isEqualTo(1);
ConstraintViolation<Person> violation = constraintViolations.iterator().next();
assertThat(violation.getPropertyPath().toString()).isEqualTo("firstName");
assertThat(violation.getMessage()).isEqualTo("may not be empty");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment