public class BaseProviderRule
extends org.junit.rules.ExternalResource
| Modifier and Type | Field and Description |
|---|---|
protected au.com.dius.pact.model.MockProviderConfig |
config |
protected java.lang.String |
provider |
protected java.lang.Object |
target |
| Constructor and Description |
|---|
BaseProviderRule(java.lang.Object target,
java.lang.String provider,
java.lang.String hostInterface,
java.lang.Integer port,
au.com.dius.pact.model.PactSpecVersion pactVersion) |
| Modifier and Type | Method and Description |
|---|---|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description) |
au.com.dius.pact.model.MockProviderConfig |
getConfig() |
au.com.dius.pact.consumer.MockServer |
getMockServer() |
protected java.util.Map<java.lang.String,au.com.dius.pact.model.RequestResponsePact> |
getPacts(java.lang.String fragment)
scan all methods for @Pact annotation and execute them, if not already initialized
|
java.lang.Integer |
getPort() |
java.lang.String |
getUrl()
Returns the URL for the mock server
|
protected void |
validateResult(au.com.dius.pact.consumer.PactVerificationResult result,
PactVerification pactVerification) |
protected final java.lang.String provider
protected final java.lang.Object target
protected au.com.dius.pact.model.MockProviderConfig config
public BaseProviderRule(java.lang.Object target,
java.lang.String provider,
java.lang.String hostInterface,
java.lang.Integer port,
au.com.dius.pact.model.PactSpecVersion pactVersion)
public au.com.dius.pact.model.MockProviderConfig getConfig()
public au.com.dius.pact.consumer.MockServer getMockServer()
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 void validateResult(au.com.dius.pact.consumer.PactVerificationResult result,
PactVerification pactVerification)
throws java.lang.Throwable
java.lang.Throwableprotected java.util.Map<java.lang.String,au.com.dius.pact.model.RequestResponsePact> getPacts(java.lang.String fragment)
fragment - public java.lang.String getUrl()
public java.lang.Integer getPort()