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: 12 additions & 0 deletions src/content/docs/docs/junit-jupiter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ WireMock server, defaulting to a random port, HTTP only (no HTTPS).
To get the running port number, base URL or a DSL instance you can declare a parameter of type `WireMockRuntimeInfo`
in your test or lifecycle methods.

If you want a copy-paste starting point, `@WireMockTest` and `WireMockRuntimeInfo` are imported from
`com.github.tomakehurst.wiremock.junit5`:

```java
import com.github.tomakehurst.wiremock.client.WireMock;
import com.github.tomakehurst.wiremock.junit5.WireMockRuntimeInfo;
import com.github.tomakehurst.wiremock.junit5.WireMockTest;
import org.junit.jupiter.api.Test;

import static com.github.tomakehurst.wiremock.client.WireMock.*;
```

```java
@WireMockTest
public class DeclarativeWireMockTest {
Expand Down