Skip to content

Commit 745aeda

Browse files
committed
Fix typos in testing sections of Reference Manual
1 parent c634b2f commit 745aeda

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

src/docs/asciidoc/testing-webtestclient.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ on the builder to customize the default WebFlux Java configuration.
4444
[[webtestclient-fn-config]]
4545
=== Bind to Router Function
4646

47-
The folloiwng example shows how to set up a server from a
47+
The following example shows how to set up a server from a
4848
<<web-reactive.adoc#webflux-fn,RouterFunction>>:
4949

5050
====

src/docs/asciidoc/testing.adoc

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ Framework>> instead.
190190
[[integration-testing]]
191191
== Integration Testing
192192

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
194194
Spring applications. It includes the following topics:
195195

196196
* <<integration-testing-overview>>
@@ -466,7 +466,7 @@ file:
466466
// class body...
467467
}
468468
----
469-
<1> Referring to a XML file.
469+
<1> Referring to an XML file.
470470
====
471471

472472
The following example shows a `@ContextConfiguration` annotation that refers to a class:
@@ -1291,7 +1291,7 @@ configuration class:
12911291
<1> Specify the configuration class.
12921292
====
12931293

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
12951295
the location of a configuration file:
12961296

12971297
====
@@ -1532,7 +1532,7 @@ configuration of individual JUnit 4 based test classes, as follows:
15321532
----
15331533
====
15341534

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,
15361536
since annotations in JUnit 5 can also be used as meta-annotations.
15371537
Consider the following example:
15381538

@@ -2373,7 +2373,7 @@ configuration file and the superclass's configuration file:
23732373
====
23742374

23752375
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
23772377
`ExtendedConfig` classes, in that order. Beans defined in `ExtendedConfig` can, therefore,
23782378
override (that is, replace) those defined in `BaseConfig`.
23792379
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:
24012401
====
24022402

24032403
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
24052405
`ExtendedInitializer`. Note, however, that the order in which the initializers are
24062406
invoked depends on whether they implement Spring's `Ordered` interface or are annotated
24072407
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
28092809
`**/*.properties`) are not permitted: Each location must evaluate to exactly one
28102810
`.properties` or `.xml` resource.
28112811

2812-
The folowing example uses a test properties file:
2812+
The following example uses a test properties file:
28132813

28142814
====
28152815
[source,java,indent=0]
@@ -3549,7 +3549,7 @@ request-scoped and session-scoped beans by following these steps:
35493549
`WebApplicationContext` (with dependency injection).
35503550
. Perform assertions against the mocks.
35513551

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
35533553
that the `userService` bean has a dependency on a request-scoped `loginAction` bean.
35543554
Also, the `LoginAction` is instantiated by using <<core.adoc#expressions,SpEL expressions>> that
35553555
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[`@
42324232
[[testcontext-executing-sql-declaratively-tx]]
42334233
*Transaction management for `@Sql`*
42344234

4235-
By default, the `SqlScriptsTestExecutionListener` infer the desired transaction
4235+
By default, the `SqlScriptsTestExecutionListener` infers the desired transaction
42364236
semantics for scripts configured by using `@Sql`. Specifically, SQL scripts are run
42374237
without a transaction, within an existing Spring-managed transaction (for example, a
42384238
transaction managed by the `TransactionalTestExecutionListener` for a test annotated with
@@ -4453,7 +4453,7 @@ of `AbstractJUnit4SpringContextTests` that adds some convenience functionality f
44534453
access. This class expects a `javax.sql.DataSource` bean and a `PlatformTransactionManager`
44544454
bean to be defined in the `ApplicationContext`. When you extend
44554455
`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
44574457
queries to confirm database state both before and after running
44584458
database-related application code, and Spring ensures that such queries run in the scope of
44594459
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
47024702
access. This class expects a `javax.sql.DataSource` bean and a `PlatformTransactionManager`
47034703
bean to be defined in the `ApplicationContext`. When you extend
47044704
`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
47064706
queries to confirm database state both before and after running
47074707
database-related application code, and Spring ensures that such queries run in the scope of
47084708
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>>.
47494749
[[spring-mvc-test-server]]
47504750
==== Server-Side Tests
47514751

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.
47534753
To do so, instantiate the controller, inject it with mocked or stubbed dependencies, and call
47544754
its methods (passing `MockHttpServletRequest`, `MockHttpServletResponse`, and others, as necessary).
47554755
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
50225022
----
50235023
====
50245024

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,
50265026
as the following example shows:
50275027

50285028
====
@@ -5232,7 +5232,7 @@ with an actual client and server running.
52325232
The easiest way to think about this is by starting with a blank `MockHttpServletRequest`.
52335233
Whatever you add to it is what the request becomes. Things that may catch you by surprise
52345234
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
52365236
"`redirected`" URLs are saved in the `MockHttpServletResponse` and can be asserted with
52375237
expectations.
52385238

0 commit comments

Comments
 (0)