Skip to content

Commit 7107c8c

Browse files
committed
Fix typo & grammar in MVC Test reference doc
1 parent 42588cb commit 7107c8c

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

src/asciidoc/testing.adoc

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3908,12 +3908,12 @@ to a degree:
39083908

39093909
Which setup option should you use?
39103910

3911-
The __"webAppContextSetup"__ loads the actual Spring MVC configuration resulting in a
3911+
The __"webAppContextSetup"__ loads your actual Spring MVC configuration resulting in a
39123912
more complete integration test. Since the __TestContext framework__ caches the loaded
3913-
Spring configuration, it helps to keep tests running fast even as more tests get added.
3914-
Furthermore, you can inject mock services into controllers through Spring configuration,
3915-
in order to remain focused on testing the web layer. Here is an example of declaring a
3916-
mock service with Mockito:
3913+
Spring configuration, it helps keep tests running fast, even as you introduce more tests
3914+
in your test suite. Furthermore, you can inject mock services into controllers through
3915+
Spring configuration in order to remain focused on testing the web layer. Here is an
3916+
example of declaring a mock service with Mockito:
39173917

39183918
[source,xml,indent=0]
39193919
[subs="verbatim,quotes"]
@@ -3923,7 +3923,7 @@ mock service with Mockito:
39233923
</bean>
39243924
----
39253925

3926-
Then you can inject the mock service into the test in order set up and verify
3926+
You can then inject the mock service into the test in order set up and verify
39273927
expectations:
39283928

39293929
[source,java,indent=0]
@@ -3948,17 +3948,17 @@ expectations:
39483948
----
39493949

39503950
The __"standaloneSetup"__ on the other hand is a little closer to a unit test. It tests
3951-
one controller at a time, the controller can be injected with mock dependencies
3952-
manually, and it doesn't involve loading Spring configuration. Such tests are more
3953-
focused in style and make it easier to see which controller is being tested, whether any
3954-
specific Spring MVC configuration is required to work, and so on. The "standaloneSetup"
3955-
is also a very convenient way to write ad-hoc tests to verify some behavior or to debug
3956-
an issue.
3957-
3958-
Just like with integration vs unit testing, there is no right or wrong answer. Using the
3959-
"standaloneSetup" does imply the need for some additional "webAppContextSetup" tests to
3960-
verify the Spring MVC configuration. Alternatively, you can decide to write all tests with
3961-
"webAppContextSetup" and always test against actual Spring MVC configuration.
3951+
one controller at a time: the controller can be injected with mock dependencies manually,
3952+
and it doesn't involve loading Spring configuration. Such tests are more focused on style
3953+
and make it easier to see which controller is being tested, whether any specific Spring
3954+
MVC configuration is required to work, and so on. The "standaloneSetup" is also a very
3955+
convenient way to write ad-hoc tests to verify specific behavior or to debug an issue.
3956+
3957+
Just like with any "integration vs. unit testing" debate, there is no right or wrong
3958+
answer. However, using the "standaloneSetup" does imply the need for additional
3959+
"webAppContextSetup" tests in order to verify your Spring MVC configuration.
3960+
Alternatively, you may choose to write all tests with "webAppContextSetup" in order to
3961+
always test against your actual Spring MVC configuration.
39623962

39633963
[[spring-mvc-test-server-performing-requests]]
39643964
===== Performing Requests
@@ -4033,7 +4033,7 @@ properties:
40334033

40344034
The above properties will affect every request performed through the `MockMvc` instance.
40354035
If the same property is also specified on a given request, it overrides the default value.
4036-
That is why the HTTP method and URI in default request don't matter since they must be
4036+
That is why the HTTP method and URI in the default request don't matter since they must be
40374037
specified on every request.
40384038

40394039
[[spring-mvc-test-server-defining-expectations]]

0 commit comments

Comments
 (0)