committed by
Janne Valkealahti
parent
d4f0828765
commit
8721d01ed8
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.2.2.RELEASE</version>
|
||||
<version>2.4.2</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>io.spring</groupId>
|
||||
@@ -27,6 +27,11 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-jdbc</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-task</artifactId>
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
configuration-properties.classes=io.spring.taskapp.configuration.TaskAppProperties
|
||||
@@ -16,25 +16,24 @@
|
||||
|
||||
package io.spring.taskapp;
|
||||
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.test.system.OutputCaptureRule;
|
||||
import org.springframework.boot.test.system.CapturedOutput;
|
||||
import org.springframework.boot.test.system.OutputCaptureExtension;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@ExtendWith(OutputCaptureExtension.class)
|
||||
public class TaskappApplicationTests {
|
||||
|
||||
@Rule
|
||||
public OutputCaptureRule outputCapture = new OutputCaptureRule();
|
||||
|
||||
@Test
|
||||
public void contextLoads() {
|
||||
public void contextLoads(CapturedOutput output) {
|
||||
String[] args = {"--taskapp.exitMessage=FOO"};
|
||||
SpringApplication.run(TaskappApplication.class, args);
|
||||
|
||||
String output = this.outputCapture.toString();
|
||||
|
||||
assertThat(output).contains(" exitMessage='FOO', errorMessage='null'");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user