Polish "Fix syntax errors in docs"

Closes gh-17835
This commit is contained in:
Stephane Nicoll
2019-08-12 10:54:33 +02:00
parent 0bdf2b8742
commit 56c2a52ea4
2 changed files with 47 additions and 19 deletions

View File

@@ -7933,27 +7933,11 @@ for assertions, as follows:
[source,java,indent=0]
----
import org.junit.Rule;
import org.junit.Test;
import org.springframework.boot.test.rule.OutputCapture;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
public class MyTest {
@Rule
public OutputCapture capture = new OutputCapture();
@Test
public void testName() throws Exception {
System.out.println("Hello World!");
assertThat(capture.toString(), containsString("World");
}
}
include::{test-examples}/test/rule/OutputCaptureTests.java[tag=test]
----
[[boot-features-rest-templates-test-utility]]
==== TestRestTemplate