Use AssertJ in spring-boot-samples
See gh-5083
This commit is contained in:
@@ -24,7 +24,7 @@ import org.springframework.boot.test.OutputCapture;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Basic integration tests for Velocity application with no web layer.
|
||||
@@ -41,7 +41,7 @@ public class SampleVelocityApplicationTests {
|
||||
@Test
|
||||
public void testVelocityTemplate() throws Exception {
|
||||
String result = SampleVelocityApplicationTests.output.toString();
|
||||
assertTrue("Wrong output: " + result, result.contains("Hello, Andy"));
|
||||
assertThat(result).contains("Hello, Andy");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user