Enable Section Summary TOC for small pages
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
[[integration-testing-annotations]]
|
||||
= Annotations
|
||||
:page-section-summary-toc: 1
|
||||
|
||||
This section covers annotations that you can use when you test Spring applications.
|
||||
It includes the following topics:
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[spring-testing-annotation-bootstrapwith]]
|
||||
= `@BootstrapWith`
|
||||
:page-section-summary-toc: 1
|
||||
|
||||
`@BootstrapWith` is a class-level annotation that you can use to configure how the Spring
|
||||
TestContext Framework is bootstrapped. Specifically, you can use `@BootstrapWith` to
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[spring-testing-annotation-recordapplicationevents]]
|
||||
= `@RecordApplicationEvents`
|
||||
:page-section-summary-toc: 1
|
||||
|
||||
`@RecordApplicationEvents` is a class-level annotation that is used to instruct the
|
||||
_Spring TestContext Framework_ to record all application events that are published in the
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
[[testing.appendix]]
|
||||
= Appendix
|
||||
:page-section-summary-toc: 1
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[testing-introduction]]
|
||||
= Introduction to Spring Testing
|
||||
:page-section-summary-toc: 1
|
||||
|
||||
Testing is an integral part of enterprise software development. This chapter focuses on
|
||||
the value added by the IoC principle to xref:testing/unit.adoc[unit testing] and on the benefits
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[spring-mvc-test-framework]]
|
||||
= MockMvc
|
||||
:page-section-summary-toc: 1
|
||||
|
||||
The Spring MVC Test framework, also known as MockMvc, provides support for testing Spring
|
||||
MVC applications. It performs full Spring MVC request handling but via mock request and
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[spring-mvc-test-server-filters]]
|
||||
= Filter Registrations
|
||||
:page-section-summary-toc: 1
|
||||
|
||||
When setting up a `MockMvc` instance, you can register one or more Servlet `Filter`
|
||||
instances, as the following example shows:
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[spring-mvc-test-server-htmlunit]]
|
||||
= HtmlUnit Integration
|
||||
:page-section-summary-toc: 1
|
||||
|
||||
Spring provides integration between xref:testing/spring-mvc-test-framework/server.adoc[MockMvc] and
|
||||
https://htmlunit.sourceforge.io/[HtmlUnit]. This simplifies performing end-to-end testing
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[spring-mvc-test-server-resources]]
|
||||
= Further Examples
|
||||
:page-section-summary-toc: 1
|
||||
|
||||
The framework's own tests include
|
||||
{spring-framework-main-code}/spring-test/src/test/java/org/springframework/test/web/servlet/samples[
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[spring-mvc-test-server-static-imports]]
|
||||
= Static Imports
|
||||
:page-section-summary-toc: 1
|
||||
|
||||
When using MockMvc directly to perform requests, you'll need static imports for:
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[spring-mvc-test-server]]
|
||||
= Overview
|
||||
:page-section-summary-toc: 1
|
||||
|
||||
You can write plain unit tests for Spring MVC by instantiating a controller, injecting it
|
||||
with dependencies, and calling its methods. However such tests do not verify request
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[testcontext-framework]]
|
||||
= Spring TestContext Framework
|
||||
:page-section-summary-toc: 1
|
||||
|
||||
The Spring TestContext Framework (located in the `org.springframework.test.context`
|
||||
package) provides generic, annotation-driven unit and integration testing support that is
|
||||
|
||||
Reference in New Issue
Block a user