public class PactRule
A junit rule that wraps every test annotated with 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. If no host is given, it will default to localhost. If no port is given, it will default to a random port.
| Modifier and Type | Field and Description |
|---|---|
static au.com.dius.pact.consumer.VerificationResult |
PACT_VERIFIED |
| Modifier and Type | Method and Description |
|---|---|
org.junit.runners.model.Statement |
apply() |
au.com.dius.pact.model.MockProviderConfig |
getConfig() |
java.util.Map<java.lang.String,au.com.dius.pact.model.PactFragment> |
getPacts()
scan all methods for @Pact annotation and execute them, if not already initialized
|
public au.com.dius.pact.model.MockProviderConfig getConfig()
public org.junit.runners.model.Statement apply()
public java.util.Map<java.lang.String,au.com.dius.pact.model.PactFragment> getPacts()
scan all methods for @Pact annotation and execute them, if not already initialized