@@ -8,9 +8,9 @@ use https://www.gebish.org/[Geb] to make our tests even Groovy-er.
88== Why Geb and MockMvc?
99
1010Geb is backed by WebDriver, so it offers many of the
11- xref:testing/mockmvc/htmlunit/webdriver.adoc#mockmvc-server-htmlunit-webdriver-why[same benefits] that we get from
12- WebDriver. However, Geb makes things even easier by taking care of some of the
13- boilerplate code for us.
11+ xref:testing/mockmvc/htmlunit/webdriver.adoc#mockmvc-server-htmlunit-webdriver-why[same benefits]
12+ that we get from WebDriver. However, Geb makes things even easier by taking care of some
13+ of the boilerplate code for us.
1414
1515[[mockmvc-server-htmlunit-geb-setup]]
1616== MockMvc and Geb Setup
@@ -28,7 +28,8 @@ def setup() {
2828----
2929
3030NOTE: This is a simple example of using `MockMvcHtmlUnitDriverBuilder`. For more advanced
31- usage, see xref:testing/mockmvc/htmlunit/webdriver.adoc#mockmvc-server-htmlunit-webdriver-advanced-builder[Advanced `MockMvcHtmlUnitDriverBuilder`].
31+ usage, see
32+ xref:testing/mockmvc/htmlunit/webdriver.adoc#mockmvc-server-htmlunit-webdriver-advanced-builder[Advanced `MockMvcHtmlUnitDriverBuilder`].
3233
3334This ensures that any URL referencing `localhost` as the server is directed to our
3435`MockMvc` instance without the need for a real HTTP connection. Any other URL is
@@ -62,10 +63,10 @@ forwarded to the current page object. This removes a lot of the boilerplate code
6263needed when using WebDriver directly.
6364
6465As with direct WebDriver usage, this improves on the design of our
65- xref:testing/mockmvc/htmlunit/mah.adoc#mockmvc-server-htmlunit-mah-usage[HtmlUnit test] by using the Page Object
66- Pattern. As mentioned previously, we can use the Page Object Pattern with HtmlUnit and
67- WebDriver, but it is even easier with Geb. Consider our new Groovy-based
68- `CreateMessagePage` implementation:
66+ xref:testing/mockmvc/htmlunit/mah.adoc#mockmvc-server-htmlunit-mah-usage[HtmlUnit test]
67+ by using the Page Object Pattern. As mentioned previously, we can use the Page Object
68+ Pattern with HtmlUnit and WebDriver, but it is even easier with Geb. Consider our new
69+ Groovy-based `CreateMessagePage` implementation:
6970
7071[source,groovy]
7172----
0 commit comments