OutputCapture should be updated to OutputCaptureRule

resolves #615

In Boot 2.2.x they change the of OutputCapture and thus it was deprecated.
This commit is contained in:
Glenn Renfro
2019-07-15 15:28:50 -04:00
parent 7aa08f08e4
commit 4f1524a711
7 changed files with 16 additions and 15 deletions

View File

@@ -23,10 +23,11 @@ import org.junit.Rule;
import org.junit.Test;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.test.rule.OutputCapture;
import org.springframework.boot.test.system.OutputCaptureRule;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertTrue;
import static junit.framework.TestCase.assertTrue;
import static org.junit.Assert.assertEquals;
/**
* Verifies that the Task Application outputs the correct task log entries.
@@ -36,7 +37,7 @@ import static junit.framework.Assert.assertTrue;
public class BatchJobApplicationTests {
@Rule
public OutputCapture outputCapture = new OutputCapture();
public OutputCaptureRule outputCapture = new OutputCaptureRule();
@Test
public void testBatchJobApp() throws Exception {