Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions src/content/docs/docs/junit-jupiter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,8 @@ public class ProgrammaticWireMockTest {
static WireMockExtension wm2 = WireMockExtension.newInstance()
.options(wireMockConfig()
.dynamicPort()
.extensions(new ResponseTemplateTransformer(
getTemplateEngine(),
options.getResponseTemplatingGlobal(),
getFiles(),
templateModelProviders
)
)
.templatingEnabled(true)
.globalTemplating(true))
.build();

@Test
Expand All @@ -132,6 +127,9 @@ public class ProgrammaticWireMockTest {
}
```

Use `templatingEnabled(true).globalTemplating(true)` to apply response templating to all stub responses in WireMock 3.x.
Register custom extensions separately when you need extra template helpers or model data providers, not to enable global templating itself.

### Static vs. instance

In the above example, as with the declarative form, each WireMock server will be started before the first test method in the test class and stopped after the
Expand Down