public class PactProviderRule
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 for the given provider. 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.
| Constructor and Description |
|---|
PactProviderRule()
Creates a mock provider by the given name
|
PactProviderRule()
Creates a mock provider by the given name
|
PactProviderRule()
Creates a mock provider by the given name
|
PactProviderRule()
Creates a mock provider by the given name
|
PactProviderRule()
Creates a mock provider by the given name. Binds to localhost and a random port.
|
PactProviderRule()
Creates a mock provider by the given name. Binds to localhost and a random port.
|
| 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 PactProviderRule()
Creates a mock provider by the given name
public PactProviderRule()
Creates a mock provider by the given name
public PactProviderRule()
Creates a mock provider by the given name
public PactProviderRule()
Creates a mock provider by the given name
public PactProviderRule()
Creates a mock provider by the given name. Binds to localhost and a random port.
public PactProviderRule()
Creates a mock provider by the given name. Binds to localhost and a random port.
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