-
- All Implemented Interfaces:
-
au.com.dius.pact.provider.junit5.TestTarget
public class MessageTestTarget implements TestTarget
Test target for use with asynchronous providers (like with message queues).
This target will look for methods with a @PactVerifyProvider annotation where the value is the description of the interaction.
-
-
Constructor Summary
Constructors Constructor Description MessageTestTarget(List<String> packagesToScan, ClassLoader classLoader)MessageTestTarget(List<String> packagesToScan)MessageTestTarget()
-
Method Summary
Modifier and Type Method Description BooleanisHttpTarget()If this is a request response (HTTP or HTTPS) target ProviderInfogetProviderInfo(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. UnitprepareVerifier(IProviderVerifier verifier, Object testInstance)Prepares the verifier for use during the test ProviderResponseexecuteInteraction(Object client, Object request)Executes the test (using the client and request from prepareRequest, if any) -
-
Constructor Detail
-
MessageTestTarget
MessageTestTarget(List<String> packagesToScan, ClassLoader classLoader)
-
MessageTestTarget
MessageTestTarget()
-
-
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)
-
-
-
-