Use assertThatObject to save casting

Update tests that use `assertThat((Object) ...)` to use the convenience
`assertThatObject(...)` method instead.

Issue gh-8945
This commit is contained in:
Phillip Webb
2020-08-04 10:51:17 -07:00
committed by Rob Winch
parent 0a3eeb9c80
commit 2f8e835b11
3 changed files with 9 additions and 9 deletions

View File

@@ -22,7 +22,7 @@ import java.util.List;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatObject;
/**
* @author Rob Winch
@@ -33,7 +33,7 @@ public class ObjectPostProcessorTests {
@Test
public void convertTypes() {
assertThat((Object) PerformConversion.perform(new ArrayList<>())).isInstanceOf(LinkedList.class);
assertThatObject(PerformConversion.perform(new ArrayList<>())).isInstanceOf(LinkedList.class);
}
static class ListToLinkedListObjectPostProcessor implements ObjectPostProcessor<List<?>> {