public class HttpTarget extends BaseTarget
Target,
that run Interaction against http service and verify responsetestClass, testTarget, valueResolver| Constructor and Description |
|---|
HttpTarget(int port)
Host of tested service is assumed as "localhost"
|
HttpTarget(java.lang.String host,
int port) |
HttpTarget(java.lang.String protocol,
java.lang.String host,
int port) |
HttpTarget(java.lang.String protocol,
java.lang.String host,
int port,
java.lang.String path) |
HttpTarget(java.lang.String protocol,
java.lang.String host,
int port,
java.lang.String path,
boolean insecure) |
HttpTarget(java.net.URL url) |
HttpTarget(java.net.URL url,
boolean insecure) |
| Modifier and Type | Method and Description |
|---|---|
void |
testInteraction(java.lang.String consumerName,
au.com.dius.pact.model.Interaction interaction)
Run
Interaction and perform response verification |
getValueResolver, setTestClass, setValueResolverpublic HttpTarget(java.lang.String host,
int port)
host - host of tested serviceport - port of tested servicepublic HttpTarget(int port)
port - port of tested servicepublic HttpTarget(java.lang.String protocol,
java.lang.String host,
int port)
host - host of tested serviceport - port of tested serviceprotocol - protocol of tested servicepublic HttpTarget(java.lang.String protocol,
java.lang.String host,
int port,
java.lang.String path)
host - host of tested serviceport - port of tested serviceprotocol - protocol of tested servicepath - protocol of the tested servicepublic HttpTarget(java.lang.String protocol,
java.lang.String host,
int port,
java.lang.String path,
boolean insecure)
host - host of tested serviceport - port of tested serviceprotocol - protocol of the tested servicepath - path of the tested serviceinsecure - true if certificates should be ignoredpublic HttpTarget(java.net.URL url)
url - url of the tested servicepublic HttpTarget(java.net.URL url,
boolean insecure)
url - url of the tested serviceinsecure - true if certificates should be ignoredpublic void testInteraction(java.lang.String consumerName,
au.com.dius.pact.model.Interaction interaction)
Interaction and perform response verification
Any exception will be caught by caller and reported as test failure
testInteraction in interface TargettestInteraction in class BaseTargetconsumerName - consumer name that generated the interactioninteraction - interaction to be tested