@@ -190,7 +190,7 @@ Framework>> instead.
190
190
[[integration-testing]]
191
191
== Integration Testing
192
192
193
- This section covers (most of the rest of this chapter) covers integration testing for
193
+ This section (most of the rest of this chapter) covers integration testing for
194
194
Spring applications. It includes the following topics:
195
195
196
196
* <<integration-testing-overview>>
@@ -466,7 +466,7 @@ file:
466
466
// class body...
467
467
}
468
468
----
469
- <1> Referring to a XML file.
469
+ <1> Referring to an XML file.
470
470
====
471
471
472
472
The following example shows a `@ContextConfiguration` annotation that refers to a class:
@@ -1291,7 +1291,7 @@ configuration class:
1291
1291
<1> Specify the configuration class.
1292
1292
====
1293
1293
1294
- The following example shows how to use the `@SpringJUnitConfig` annotation to specify a
1294
+ The following example shows how to use the `@SpringJUnitConfig` annotation to specify
1295
1295
the location of a configuration file:
1296
1296
1297
1297
====
@@ -1532,7 +1532,7 @@ configuration of individual JUnit 4 based test classes, as follows:
1532
1532
----
1533
1533
====
1534
1534
1535
- If we writ tests that use JUnit Jupiter, we can reduce code duplication even further,
1535
+ If we write tests that use JUnit Jupiter, we can reduce code duplication even further,
1536
1536
since annotations in JUnit 5 can also be used as meta-annotations.
1537
1537
Consider the following example:
1538
1538
@@ -2373,7 +2373,7 @@ configuration file and the superclass's configuration file:
2373
2373
====
2374
2374
2375
2375
Similarly, in the next example, which uses annotated classes, the
2376
- `ApplicationContext` for `ExtendedTest` are loaded from the `BaseConfig` and
2376
+ `ApplicationContext` for `ExtendedTest` is loaded from the `BaseConfig` and
2377
2377
`ExtendedConfig` classes, in that order. Beans defined in `ExtendedConfig` can, therefore,
2378
2378
override (that is, replace) those defined in `BaseConfig`.
2379
2379
The following example shows how one class can extend another and use both its own
@@ -2401,7 +2401,7 @@ configuration class and the superclass's configuration class:
2401
2401
====
2402
2402
2403
2403
In the next example, which uses context initializers, the `ApplicationContext` for
2404
- `ExtendedTest` are initialized by using `BaseInitializer` and
2404
+ `ExtendedTest` is initialized by using `BaseInitializer` and
2405
2405
`ExtendedInitializer`. Note, however, that the order in which the initializers are
2406
2406
invoked depends on whether they implement Spring's `Ordered` interface or are annotated
2407
2407
with Spring's `@Order` annotation or the standard `@Priority` annotation.
@@ -2809,7 +2809,7 @@ is loaded by using the specified resource protocol. Resource location wildcards
2809
2809
`**/*.properties`) are not permitted: Each location must evaluate to exactly one
2810
2810
`.properties` or `.xml` resource.
2811
2811
2812
- The folowing example uses a test properties file:
2812
+ The following example uses a test properties file:
2813
2813
2814
2814
====
2815
2815
[source,java,indent=0]
@@ -3549,7 +3549,7 @@ request-scoped and session-scoped beans by following these steps:
3549
3549
`WebApplicationContext` (with dependency injection).
3550
3550
. Perform assertions against the mocks.
3551
3551
3552
- The nexxt code snippet shows the XML configuration for a login use case. Note
3552
+ The next code snippet shows the XML configuration for a login use case. Note
3553
3553
that the `userService` bean has a dependency on a request-scoped `loginAction` bean.
3554
3554
Also, the `LoginAction` is instantiated by using <<core.adoc#expressions,SpEL expressions>> that
3555
3555
retrieve the username and password from the current HTTP request. In our test, we
@@ -4232,7 +4232,7 @@ of individual attributes in {api-spring-framework}/test/context/jdbc/Sql.html[`@
4232
4232
[[testcontext-executing-sql-declaratively-tx]]
4233
4233
*Transaction management for `@Sql`*
4234
4234
4235
- By default, the `SqlScriptsTestExecutionListener` infer the desired transaction
4235
+ By default, the `SqlScriptsTestExecutionListener` infers the desired transaction
4236
4236
semantics for scripts configured by using `@Sql`. Specifically, SQL scripts are run
4237
4237
without a transaction, within an existing Spring-managed transaction (for example, a
4238
4238
transaction managed by the `TransactionalTestExecutionListener` for a test annotated with
@@ -4453,7 +4453,7 @@ of `AbstractJUnit4SpringContextTests` that adds some convenience functionality f
4453
4453
access. This class expects a `javax.sql.DataSource` bean and a `PlatformTransactionManager`
4454
4454
bean to be defined in the `ApplicationContext`. When you extend
4455
4455
`AbstractTransactionalJUnit4SpringContextTests`, you can access a `protected` `jdbcTemplate`
4456
- instance variable that you can used to run SQL statements to query the database. You can use such
4456
+ instance variable that you can use to run SQL statements to query the database. You can use such
4457
4457
queries to confirm database state both before and after running
4458
4458
database-related application code, and Spring ensures that such queries run in the scope of
4459
4459
the same transaction as the application code. When used in conjunction with an ORM tool,
@@ -4702,7 +4702,7 @@ of `AbstractTestNGSpringContextTests` that adds some convenience functionality f
4702
4702
access. This class expects a `javax.sql.DataSource` bean and a `PlatformTransactionManager`
4703
4703
bean to be defined in the `ApplicationContext`. When you extend
4704
4704
`AbstractTransactionalTestNGSpringContextTests`, you can access a `protected` `jdbcTemplate`
4705
- instance variable that you can used to execute SQL statements to query the database. You can use such
4705
+ instance variable that you can use to execute SQL statements to query the database. You can use such
4706
4706
queries to confirm database state both before and after running
4707
4707
database-related application code, and Spring ensures that such queries run in the scope of
4708
4708
the same transaction as the application code. When used in conjunction with an ORM tool,
@@ -4749,7 +4749,7 @@ integration tests, see <<spring-mvc-test-vs-end-to-end-integration-tests>>.
4749
4749
[[spring-mvc-test-server]]
4750
4750
==== Server-Side Tests
4751
4751
4752
- You can write a plain unit test for a Spring MVC controller bt using JUnit or TestNG.
4752
+ You can write a plain unit test for a Spring MVC controller by using JUnit or TestNG.
4753
4753
To do so, instantiate the controller, inject it with mocked or stubbed dependencies, and call
4754
4754
its methods (passing `MockHttpServletRequest`, `MockHttpServletResponse`, and others, as necessary).
4755
4755
However, when writing such a unit test, much remains untested: for example, request
@@ -5022,7 +5022,7 @@ You can specify query parameters in URI template style, as the following example
5022
5022
----
5023
5023
====
5024
5024
5025
- You can also add Servlet request parameters that represent either query of form parameters,
5025
+ You can also add Servlet request parameters that represent either query or form parameters,
5026
5026
as the following example shows:
5027
5027
5028
5028
====
@@ -5232,7 +5232,7 @@ with an actual client and server running.
5232
5232
The easiest way to think about this is by starting with a blank `MockHttpServletRequest`.
5233
5233
Whatever you add to it is what the request becomes. Things that may catch you by surprise
5234
5234
are that there is no context path by default; no `jsessionid` cookie; no forwarding, error,
5235
- or async dispatches; andm , therefore, no actual JSP rendering. Instead, "`forwarded`" and
5235
+ or async dispatches; and , therefore, no actual JSP rendering. Instead, "`forwarded`" and
5236
5236
"`redirected`" URLs are saved in the `MockHttpServletResponse` and can be asserted with
5237
5237
expectations.
5238
5238
0 commit comments