-
- All Implemented Interfaces:
-
au.com.dius.pact.provider.junit5.TestTarget
public class HttpTestTarget implements TestTarget
Test target for HTTP tests. This is the default target.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
HttpTestTarget.Companion
-
Constructor Summary
Constructors Constructor Description HttpTestTarget(String host, Integer port, String path, Function0<IHttpClientFactory> httpClientFactory)
-
Method Summary
Modifier and Type Method Description Boolean
isHttpTarget()
If this is a request response (HTTP or HTTPS) target ProviderInfo
getProviderInfo(String serviceName, PactSource pactSource)
Returns information about the provider Pair<Object, Object>
prepareRequest(Interaction interaction, Map<String, Object> context)
Prepares the request for the interaction. Unit
prepareVerifier(IProviderVerifier verifier, Object testInstance)
Prepares the verifier for use during the test ProviderResponse
executeInteraction(Object client, Object request)
Executes the test (using the client and request from prepareRequest, if any) final String
getHost()
final Integer
getPort()
final String
getPath()
final Function0<IHttpClientFactory>
getHttpClientFactory()
-
-
Method Detail
-
isHttpTarget
Boolean isHttpTarget()
If this is a request response (HTTP or HTTPS) target
-
getProviderInfo
ProviderInfo getProviderInfo(String serviceName, PactSource pactSource)
Returns information about the provider
-
prepareRequest
Pair<Object, Object> prepareRequest(Interaction interaction, Map<String, Object> context)
Prepares the request for the interaction.
-
prepareVerifier
Unit prepareVerifier(IProviderVerifier verifier, Object testInstance)
Prepares the verifier for use during the test
-
executeInteraction
ProviderResponse executeInteraction(Object client, Object request)
Executes the test (using the client and request from prepareRequest, if any)
-
getHttpClientFactory
final Function0<IHttpClientFactory> getHttpClientFactory()
-
-
-
-