Skip to content

Commit 438e2f2

Browse files
author
Ronald Holshausen
committedMar 28, 2020
fix: correct the JUnit 4 readme to use the correct classes #1056
1 parent da20132 commit 438e2f2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎consumer/pact-jvm-consumer-junit/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The library is available on maven central using:
1515

1616
### Using the base ConsumerPactTest
1717

18-
To write a pact spec extend ConsumerPactTestMk2. This base class defines the following four methods which must be
18+
To write a pact spec extend ConsumerPactTest. This base class defines the following four methods which must be
1919
overridden in your test class.
2020

2121
* *providerName:* Returns the name of the API provider that Pact will mock
@@ -39,7 +39,7 @@ import java.util.Map;
3939

4040
import static org.junit.Assert.assertEquals;
4141

42-
public class ExampleJavaConsumerPactTest extends ConsumerPactTestMk2 {
42+
public class ExampleJavaConsumerPactTest extends ConsumerPactTest {
4343

4444
@Override
4545
protected RequestResponsePact createFragment(PactDslWithProvider builder) {
@@ -101,7 +101,7 @@ and then add the rule:
101101

102102
```java
103103
@Rule
104-
public PactProviderRuleMk2 mockProvider = new PactProviderRuleMk2("test_provider", "localhost", 8080, this);
104+
public PactProviderRule mockProvider = new PactProviderRule("test_provider", "localhost", 8080, this);
105105
```
106106

107107
The hostname and port are optional. If left out, it will default to 127.0.0.1 and a random available port. You can get
@@ -691,11 +691,11 @@ To have your consumer tests generate V2 format pacts, you can set the specificat
691691
}
692692
```
693693

694-
If you are using the `PactProviderRuleMk2`, you can pass the version into the constructor for the rule.
694+
If you are using the `PactProviderRule`, you can pass the version into the constructor for the rule.
695695

696696
```java
697697
@Rule
698-
public PactProviderRuleMk2 mockTestProvider = new PactProviderRuleMk2("test_provider", PactSpecVersion.V2, this);
698+
public PactProviderRule mockTestProvider = new PactProviderRule("test_provider", PactSpecVersion.V2, this);
699699
```
700700

701701
## Consumer test for a message consumer

0 commit comments

Comments
 (0)
Please sign in to comment.