Use AssertJ in spring-boot-samples
See gh-5083
This commit is contained in:
@@ -21,8 +21,7 @@ import org.junit.Test;
|
||||
|
||||
import org.springframework.boot.test.OutputCapture;
|
||||
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Integration tests for {@link SampleJooqApplication}.
|
||||
@@ -37,11 +36,11 @@ public class SampleJooqApplicationTests {
|
||||
@Test
|
||||
public void outputResults() throws Exception {
|
||||
SampleJooqApplication.main(NO_ARGS);
|
||||
assertThat(this.out.toString(), containsString("jOOQ Fetch 1 Greg Turnquest"));
|
||||
assertThat(this.out.toString(), containsString("jOOQ Fetch 2 Craig Walls"));
|
||||
assertThat(this.out.toString(),
|
||||
containsString("jOOQ SQL " + "[Learning Spring Boot : Greg Turnquest, "
|
||||
+ "Spring Boot in Action : Craig Walls]"));
|
||||
assertThat(this.out.toString()).contains("jOOQ Fetch 1 Greg Turnquest");
|
||||
assertThat(this.out.toString()).contains("jOOQ Fetch 2 Craig Walls");
|
||||
assertThat(this.out.toString())
|
||||
.contains("jOOQ SQL " + "[Learning Spring Boot : Greg Turnquest, "
|
||||
+ "Spring Boot in Action : Craig Walls]");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user