Skip to content

Commit

Permalink
add hint about specific junit5spring dependency
Browse files Browse the repository at this point in the history
I was wondering about missing dependencies for `MockMvcTestTarget`. Found it in an issue (pact-foundation#1072 (comment)) but not in the docs
  • Loading branch information
mf81bln authored Dec 9, 2020
1 parent 0fc1cd9 commit c696917
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion provider/junit5spring/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

This module extends the base [Pact JUnit5 module](/provider/junit5/README.md). See that for more details.

## Dependency
The combined library (JUnit5 + Spring) is available on maven central using:

group-id = au.com.dius.pact.provider
artifact-id = junit5spring
version-id = 4.1.x

## Usage
For writing Spring Pact verification tests with JUnit 5, there is an JUnit 5 Invocation Context Provider that you can use with
the `@TestTemplate` annotation. This will generate a test for each interaction found for the pact files for the provider.

Expand Down Expand Up @@ -98,4 +106,4 @@ class MockMvcTestTargetStandaloneMockMvcTestJava {
```

**Important:** Since `@WebMvcTest` starts only Spring MVC components you can't use `PactVerificationSpringProvider`
and need to fallback to `PactVerificationInvocationContextProvider`
and need to fallback to `PactVerificationInvocationContextProvider`

0 comments on commit c696917

Please sign in to comment.