|
|
@ -19,7 +19,9 @@ package sample.quartz;
|
|
|
|
import org.junit.Rule;
|
|
|
|
import org.junit.Rule;
|
|
|
|
import org.junit.Test;
|
|
|
|
import org.junit.Test;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.boot.SpringApplication;
|
|
|
|
import org.springframework.boot.test.rule.OutputCapture;
|
|
|
|
import org.springframework.boot.test.rule.OutputCapture;
|
|
|
|
|
|
|
|
import org.springframework.context.ConfigurableApplicationContext;
|
|
|
|
|
|
|
|
|
|
|
|
import static org.assertj.core.api.Assertions.assertThat;
|
|
|
|
import static org.assertj.core.api.Assertions.assertThat;
|
|
|
|
|
|
|
|
|
|
|
@ -35,9 +37,11 @@ public class SampleQuartzApplicationTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void test() {
|
|
|
|
public void test() {
|
|
|
|
SampleQuartzApplication.main(new String[0]);
|
|
|
|
try (ConfigurableApplicationContext context = SpringApplication.run(
|
|
|
|
String output = this.outputCapture.toString();
|
|
|
|
SampleQuartzApplication.class)) {
|
|
|
|
assertThat(output).contains("Hello World!");
|
|
|
|
String output = this.outputCapture.toString();
|
|
|
|
|
|
|
|
assertThat(output).contains("Hello World!");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|