File tree Expand file tree Collapse file tree 9 files changed +28
-28
lines changed
docs/src/test/java/com/example/webtestclient Expand file tree Collapse file tree 9 files changed +28
-28
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2014-2017 the original author or authors.
2
+ * Copyright 2014-2019 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
19
19
import org .junit .Before ;
20
20
import org .junit .Rule ;
21
21
22
+ import org .springframework .context .ApplicationContext ;
22
23
import org .springframework .restdocs .JUnitRestDocumentation ;
23
24
import org .springframework .test .web .reactive .server .WebTestClient ;
24
- import org .springframework .web .context .WebApplicationContext ;
25
25
26
26
import static org .springframework .restdocs .operation .preprocess .Preprocessors .prettyPrint ;
27
27
import static org .springframework .restdocs .operation .preprocess .Preprocessors .removeHeaders ;
@@ -34,7 +34,7 @@ public class CustomDefaultOperationPreprocessors {
34
34
@ Rule
35
35
public final JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation ();
36
36
37
- private WebApplicationContext context ;
37
+ private ApplicationContext context ;
38
38
39
39
@ SuppressWarnings ("unused" )
40
40
private WebTestClient webTestClient ;
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2014-2017 the original author or authors.
2
+ * Copyright 2014-2019 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
20
20
import org .junit .Rule ;
21
21
22
22
import org .springframework .beans .factory .annotation .Autowired ;
23
+ import org .springframework .context .ApplicationContext ;
23
24
import org .springframework .restdocs .JUnitRestDocumentation ;
24
25
import org .springframework .test .web .reactive .server .WebTestClient ;
25
- import org .springframework .web .context .WebApplicationContext ;
26
26
27
27
import static org .springframework .restdocs .cli .CliDocumentation .curlRequest ;
28
28
import static org .springframework .restdocs .webtestclient .WebTestClientRestDocumentation .documentationConfiguration ;
@@ -35,7 +35,7 @@ public class CustomDefaultSnippets {
35
35
public final JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation ();
36
36
37
37
@ Autowired
38
- private WebApplicationContext context ;
38
+ private ApplicationContext context ;
39
39
40
40
@ SuppressWarnings ("unused" )
41
41
private WebTestClient webTestClient ;
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2014-2016 the original author or authors.
2
+ * Copyright 2014-2019 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
20
20
import org .junit .Rule ;
21
21
22
22
import org .springframework .beans .factory .annotation .Autowired ;
23
+ import org .springframework .context .ApplicationContext ;
23
24
import org .springframework .restdocs .JUnitRestDocumentation ;
24
25
import org .springframework .test .web .reactive .server .WebTestClient ;
25
- import org .springframework .web .context .WebApplicationContext ;
26
26
27
27
import static org .springframework .restdocs .webtestclient .WebTestClientRestDocumentation .documentationConfiguration ;
28
28
@@ -34,7 +34,7 @@ public class CustomEncoding {
34
34
public final JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation ();
35
35
36
36
@ Autowired
37
- private WebApplicationContext context ;
37
+ private ApplicationContext context ;
38
38
39
39
@ SuppressWarnings ("unused" )
40
40
private WebTestClient webTestClient ;
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2014-2016 the original author or authors.
2
+ * Copyright 2014-2019 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
20
20
import org .junit .Rule ;
21
21
22
22
import org .springframework .beans .factory .annotation .Autowired ;
23
+ import org .springframework .context .ApplicationContext ;
23
24
import org .springframework .restdocs .JUnitRestDocumentation ;
24
25
import org .springframework .restdocs .templates .TemplateFormats ;
25
26
import org .springframework .test .web .reactive .server .WebTestClient ;
26
- import org .springframework .web .context .WebApplicationContext ;
27
27
28
28
import static org .springframework .restdocs .webtestclient .WebTestClientRestDocumentation .documentationConfiguration ;
29
29
@@ -35,7 +35,7 @@ public class CustomFormat {
35
35
public final JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation ();
36
36
37
37
@ Autowired
38
- private WebApplicationContext context ;
38
+ private ApplicationContext context ;
39
39
40
40
@ SuppressWarnings ("unused" )
41
41
private WebTestClient webTestClient ;
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2014-2017 the original author or authors.
2
+ * Copyright 2014-2019 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
20
20
import org .junit .Rule ;
21
21
22
22
import org .springframework .beans .factory .annotation .Autowired ;
23
+ import org .springframework .context .ApplicationContext ;
23
24
import org .springframework .restdocs .JUnitRestDocumentation ;
24
25
import org .springframework .test .web .reactive .server .WebTestClient ;
25
- import org .springframework .web .context .WebApplicationContext ;
26
26
27
27
import static org .springframework .restdocs .webtestclient .WebTestClientRestDocumentation .documentationConfiguration ;
28
28
@@ -35,7 +35,7 @@ public class CustomUriConfiguration {
35
35
private WebTestClient webTestClient ;
36
36
37
37
@ Autowired
38
- private WebApplicationContext context ;
38
+ private ApplicationContext context ;
39
39
40
40
// tag::custom-uri-configuration[]
41
41
@ Before
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2014-2016 the original author or authors.
2
+ * Copyright 2014-2019 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
19
19
import org .junit .Before ;
20
20
import org .junit .Rule ;
21
21
22
+ import org .springframework .context .ApplicationContext ;
22
23
import org .springframework .restdocs .JUnitRestDocumentation ;
23
24
import org .springframework .test .web .reactive .server .WebTestClient ;
24
- import org .springframework .web .context .WebApplicationContext ;
25
25
26
26
import static org .springframework .restdocs .hypermedia .HypermediaDocumentation .linkWithRel ;
27
27
import static org .springframework .restdocs .hypermedia .HypermediaDocumentation .links ;
@@ -37,7 +37,7 @@ public class EveryTestPreprocessing {
37
37
@ Rule
38
38
public final JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation ();
39
39
40
- private WebApplicationContext context ;
40
+ private ApplicationContext context ;
41
41
42
42
// tag::setup[]
43
43
private WebTestClient webTestClient ;
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2014-2017 the original author or authors.
2
+ * Copyright 2014-2019 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
19
19
import org .junit .jupiter .api .BeforeEach ;
20
20
import org .junit .jupiter .api .extension .ExtendWith ;
21
21
22
+ import org .springframework .context .ApplicationContext ;
22
23
import org .springframework .restdocs .RestDocumentationContextProvider ;
23
24
import org .springframework .restdocs .RestDocumentationExtension ;
24
25
import org .springframework .test .web .reactive .server .WebTestClient ;
25
- import org .springframework .web .context .WebApplicationContext ;
26
26
27
27
import static org .springframework .restdocs .webtestclient .WebTestClientRestDocumentation .documentationConfiguration ;
28
28
@@ -34,9 +34,9 @@ public class ExampleApplicationJUnit5Tests {
34
34
private WebTestClient webTestClient ;
35
35
36
36
@ BeforeEach
37
- public void setUp (WebApplicationContext webApplicationContext ,
37
+ public void setUp (ApplicationContext applicationContext ,
38
38
RestDocumentationContextProvider restDocumentation ) {
39
- this .webTestClient = WebTestClient .bindToApplicationContext (webApplicationContext )
39
+ this .webTestClient = WebTestClient .bindToApplicationContext (applicationContext )
40
40
.configureClient ()
41
41
.filter (documentationConfiguration (restDocumentation )) // <1>
42
42
.build ();
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2014-2017 the original author or authors.
2
+ * Copyright 2014-2019 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
22
22
import org .testng .annotations .BeforeMethod ;
23
23
24
24
import org .springframework .beans .factory .annotation .Autowired ;
25
+ import org .springframework .context .ApplicationContext ;
25
26
import org .springframework .restdocs .ManualRestDocumentation ;
26
27
import org .springframework .test .web .reactive .server .WebTestClient ;
27
- import org .springframework .web .context .WebApplicationContext ;
28
28
29
29
import static org .springframework .restdocs .webtestclient .WebTestClientRestDocumentation .documentationConfiguration ;
30
30
@@ -37,7 +37,7 @@ public class ExampleApplicationTestNgTests {
37
37
private WebTestClient webTestClient ;
38
38
39
39
@ Autowired
40
- private WebApplicationContext context ;
40
+ private ApplicationContext context ;
41
41
42
42
@ BeforeMethod
43
43
public void setUp (Method method ) {
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2014-2017 the original author or authors.
2
+ * Copyright 2014-2019 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
20
20
import org .junit .Rule ;
21
21
22
22
import org .springframework .beans .factory .annotation .Autowired ;
23
+ import org .springframework .context .ApplicationContext ;
23
24
import org .springframework .restdocs .JUnitRestDocumentation ;
24
25
import org .springframework .test .web .reactive .server .WebTestClient ;
25
- import org .springframework .web .context .WebApplicationContext ;
26
26
27
27
import static org .springframework .restdocs .webtestclient .WebTestClientRestDocumentation .documentationConfiguration ;
28
28
@@ -36,7 +36,7 @@ public class ExampleApplicationTests {
36
36
private WebTestClient webTestClient ;
37
37
38
38
@ Autowired
39
- private WebApplicationContext context ;
39
+ private ApplicationContext context ;
40
40
41
41
@ Before
42
42
public void setUp () {
You can’t perform that action at this time.
0 commit comments