-
- All Implemented Interfaces:
-
au.com.dius.pact.provider.junit.target.TestClassAwareTarget,au.com.dius.pact.provider.junitsupport.target.Target
public class HttpTarget extends BaseTarget
Out-of-the-box implementation of Target, that run Interaction against http service and verify response
-
-
Field Summary
Fields Modifier and Type Field Description private final Stringprotocolprivate final Stringhostprivate final Integerportprivate final Stringpathprivate final Booleaninsecureprivate final Function0<IHttpClientFactory>httpClientFactoryprivate ValueResolvervalueResolverprivate IProviderVerifierverifier
-
Constructor Summary
Constructors Constructor Description HttpTarget(String host, Integer port)HttpTarget(Integer port)HttpTarget(URL url, Boolean insecure)HttpTarget(URL url)HttpTarget(String protocol, String host, Integer port, String path, Boolean insecure, Function0<IHttpClientFactory> httpClientFactory)HttpTarget(String protocol, String host, Integer port, String path, Boolean insecure)HttpTarget(String protocol, String host, Integer port, String path)HttpTarget(String protocol, String host, Integer port)HttpTarget(String protocol, String host)HttpTarget(String protocol)HttpTarget()
-
Method Summary
Modifier and Type Method Description final StringgetProtocol()final StringgetHost()IntegergetPort()final StringgetPath()final BooleangetInsecure()final Function0<IHttpClientFactory>getHttpClientFactory()UnittestInteraction(String consumerName, Interaction interaction, PactSource source, Map<String, Object> context, Boolean pending){@inheritDoc} BooleanvalidForInteraction(Interaction interaction)-
Methods inherited from class au.com.dius.pact.provider.junit.target.BaseTarget
addResultCallback, configureVerifier, getStateHandlers, getValueResolver, getVerifier, setStateHandlers, setTestClass, setValueResolver, setVerifier, withStateHandler, withStateHandlers -
Methods inherited from class au.com.dius.pact.provider.junitsupport.target.Target
getRequestClass -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
HttpTarget
HttpTarget(Integer port)
- Parameters:
port- port of tested service
-
HttpTarget
HttpTarget(URL url, Boolean insecure)
- Parameters:
url- url of the tested serviceinsecure- true if certificates should be ignored
-
HttpTarget
HttpTarget(URL url)
- Parameters:
url- url of the tested service
-
HttpTarget
HttpTarget(String protocol, String host, Integer port, String path, Boolean insecure, Function0<IHttpClientFactory> httpClientFactory)
-
HttpTarget
HttpTarget(String protocol)
-
HttpTarget
HttpTarget()
-
-
Method Detail
-
getProtocol
final String getProtocol()
-
getInsecure
final Boolean getInsecure()
-
getHttpClientFactory
final Function0<IHttpClientFactory> getHttpClientFactory()
-
testInteraction
Unit testInteraction(String consumerName, Interaction interaction, PactSource source, Map<String, Object> context, Boolean pending)
{@inheritDoc}
-
validForInteraction
Boolean validForInteraction(Interaction interaction)
-
-
-
-