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:
@@ -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 {
|
||||
|
||||
@@ -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.*;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user