public class PactRule
extends org.junit.rules.ExternalResource
PactVerification.
Before each test, a mock server will be setup at given port/host that will provide mocked responses.
after each test, it will be teared down.| Modifier and Type | Field and Description |
|---|---|
static au.com.dius.pact.consumer.VerificationResult |
PACT_VERIFIED |
| Constructor and Description |
|---|
PactRule(java.lang.String host,
int port,
java.lang.Object target) |
| Modifier and Type | Method and Description |
|---|---|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description) |
protected java.util.Map<java.lang.String,au.com.dius.pact.model.PactFragment> |
getPacts()
scann all methods for @Pact annotation and execute them, if not already initialized
|
public PactRule(java.lang.String host,
int port,
java.lang.Object target)
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description)
apply in interface org.junit.rules.TestRuleapply in class org.junit.rules.ExternalResourceprotected java.util.Map<java.lang.String,au.com.dius.pact.model.PactFragment> getPacts()