mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-24 10:19:03 +00:00
Use AssertJ in spring-boot-samples
See gh-5083
This commit is contained in:
+2
-2
@@ -21,7 +21,7 @@ import org.junit.Test;
|
||||
|
||||
import org.springframework.boot.test.OutputCapture;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class SampleSpringXmlApplicationTests {
|
||||
|
||||
@@ -32,7 +32,7 @@ public class SampleSpringXmlApplicationTests {
|
||||
public void testDefaultSettings() throws Exception {
|
||||
SampleSpringXmlApplication.main(new String[0]);
|
||||
String output = this.outputCapture.toString();
|
||||
assertTrue("Wrong output: " + output, output.contains("Hello World"));
|
||||
assertThat(output).contains("Hello World");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user