Use assertThat from Hamcrest instead of JUnit 4

org.junit.Assert.assertThat() is deprecated as of JUnit 4.13.

See gh-22894
This commit is contained in:
Sam Brannen
2019-05-05 18:09:11 +02:00
parent d4379630e2
commit c79fdfb668
102 changed files with 108 additions and 57 deletions

View File

@@ -23,6 +23,7 @@ import org.junit.rules.TestName;
import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;

View File

@@ -56,6 +56,7 @@ import org.springframework.validation.beanvalidation.SpringValidatorAdapter;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.*;
import static org.hamcrest.core.StringContains.*;
import static org.junit.Assert.*;

View File

@@ -52,6 +52,7 @@ import org.springframework.validation.FieldError;
import org.springframework.validation.ObjectError;
import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;