diff --git a/framework-docs/modules/ROOT/pages/testing/testcontext-framework/ctx-management/web-mocks.adoc b/framework-docs/modules/ROOT/pages/testing/testcontext-framework/ctx-management/web-mocks.adoc index 267baf8e0e0..d9fbd25885e 100644 --- a/framework-docs/modules/ROOT/pages/testing/testcontext-framework/ctx-management/web-mocks.adoc +++ b/framework-docs/modules/ROOT/pages/testing/testcontext-framework/ctx-management/web-mocks.adoc @@ -20,7 +20,7 @@ managed per test method by the `ServletTestExecutionListener`. [tabs] ====== -Injecting mocks:: +Java:: + [source,java,indent=0,subs="verbatim,quotes",role="primary"] ---- diff --git a/framework-docs/modules/ROOT/pages/testing/testcontext-framework/ctx-management/web.adoc b/framework-docs/modules/ROOT/pages/testing/testcontext-framework/ctx-management/web.adoc index cfc6778bbb9..06ceb3bd4f5 100644 --- a/framework-docs/modules/ROOT/pages/testing/testcontext-framework/ctx-management/web.adoc +++ b/framework-docs/modules/ROOT/pages/testing/testcontext-framework/ctx-management/web.adoc @@ -29,9 +29,10 @@ The remaining examples in this section show some of the various configuration op loading a `WebApplicationContext`. The following example shows the TestContext framework's support for convention over configuration: +.Conventions [tabs] ====== -Conventions:: +Java:: + [source,java,indent=0,subs="verbatim,quotes",role="primary"] ---- @@ -76,9 +77,10 @@ as the `WacTests` class or static nested `@Configuration` classes). The following example shows how to explicitly declare a resource base path with `@WebAppConfiguration` and an XML resource location with `@ContextConfiguration`: +.Default resource semantics [tabs] ====== -Default resource semantics:: +Java:: + [source,java,indent=0,subs="verbatim,quotes",role="primary"] ---- @@ -118,9 +120,10 @@ whereas `@ContextConfiguration` resource locations are classpath based. The following example shows that we can override the default resource semantics for both annotations by specifying a Spring resource prefix: +.Explicit resource semantics [tabs] ====== -Explicit resource semantics:: +Java:: + [source,java,indent=0,subs="verbatim,quotes",role="primary"] ---- diff --git a/framework-docs/modules/ROOT/pages/testing/testcontext-framework/web-scoped-beans.adoc b/framework-docs/modules/ROOT/pages/testing/testcontext-framework/web-scoped-beans.adoc index 20e7926a7f5..9c8c4b755b2 100644 --- a/framework-docs/modules/ROOT/pages/testing/testcontext-framework/web-scoped-beans.adoc +++ b/framework-docs/modules/ROOT/pages/testing/testcontext-framework/web-scoped-beans.adoc @@ -47,9 +47,10 @@ the provided `MockHttpServletRequest`. When the `loginUser()` method is invoked set parameters). We can then perform assertions against the results based on the known inputs for the username and password. The following listing shows how to do so: +.Request-scoped bean test [tabs] ====== -Request-scoped bean test:: +Java:: + [source,java,indent=0,subs="verbatim,quotes",role="primary"] ---- @@ -124,9 +125,10 @@ the user service has access to the session-scoped `userPreferences` for the curr `MockHttpSession`, and we can perform assertions against the results based on the configured theme. The following example shows how to do so: +.Session-scoped bean test [tabs] ====== -Session-scoped bean test:: +Java:: + [source,java,indent=0,subs="verbatim,quotes",role="primary"] ----