Skip to content

Commit

Permalink
Merge pull request #197 from Smartmind12/patch-6
Browse files Browse the repository at this point in the history
Update junit-jupiter.md
  • Loading branch information
oleg-nenashev authored Oct 9, 2023
2 parents ed5f9e5 + 86b5232 commit 0b49d9d
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions _docs/junit-jupiter.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,15 @@ The JUnit Jupiter extension can be configured to enable "proxy mode" which simpl
### Declarative

In declarative mode this is done by setting the `proxyMode = true` in the annotation declaration. Then, provided your app's
HTTP client honours the JVM's proxy system properties, you can specify different domain (host) names when creating stubs:
HTTP client honours the JVM's proxy system properties, you can specify different domain (host) names when creating stubs.

### Programmatic

Proxy mode can be enabled via the extension builder when using the programmatic form.

{% codetabs %}

{% codetab Declarative %}

```java
@WireMockTest(proxyMode = true)
Expand Down Expand Up @@ -205,9 +213,9 @@ public class JUnitJupiterExtensionJvmProxyDeclarativeTest {
}
```

### Programmatic
{% endcodetab %}

Proxy mode can be enabled via the extension builder when using the programmatic form:
{% codetab Programmatic %}

```java
public class JUnitJupiterProgrammaticProxyTest {
Expand Down Expand Up @@ -248,6 +256,10 @@ public class JUnitJupiterProgrammaticProxyTest {
}
```

{% endcodetab %}

{% endcodetabs %}

## Subclassing the extension

Like the JUnit 4.x rule, `WireMockExtension` can be subclassed in order to extend its behaviour by hooking into its lifecycle events.
Expand Down

0 comments on commit 0b49d9d

Please sign in to comment.