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

@@ -30,7 +30,6 @@ import javax.transaction.Transactional;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
import org.springframework.context.index.sample.AbstractController;
@@ -61,8 +60,8 @@ import org.springframework.context.index.test.TestCompiler;
import org.springframework.stereotype.Component;
import org.springframework.util.ClassUtils;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
import static org.springframework.context.index.processor.Metadata.*;
/**
@@ -78,9 +77,6 @@ public class CandidateComponentsIndexerTests {
@Rule
public TemporaryFolder temporaryFolder = new TemporaryFolder();
@Rule
public ExpectedException thrown = ExpectedException.none();
@Before
public void createCompiler() throws IOException {

View File

@@ -24,8 +24,8 @@ import java.util.HashSet;
import org.junit.Test;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
import static org.springframework.context.index.processor.Metadata.*;
/**