-
- 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.
-
-
Field Summary
Fields Modifier and Type Field Description private final Map<String, Object>
userConfig
-
Constructor Summary
Constructors Constructor Description MessageTestTarget(List<String> packagesToScan, ClassLoader classLoader)
MessageTestTarget(List<String> packagesToScan)
MessageTestTarget()
-
Method Summary
Modifier and Type Method Description Map<String, Object>
getUserConfig()
Any user provided configuration Boolean
isHttpTarget()
If this is a request response (HTTP or HTTPS) target IProviderInfo
getProviderInfo(String serviceName, PactSource pactSource)
Returns information about the provider Pair<Object, Object>
prepareRequest(Pact pact, Interaction interaction, Map<String, Object> context)
Prepares the request for the interaction. Unit
prepareVerifier(IProviderVerifier verifier, Object testInstance, Pact pact)
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) -
-
Constructor Detail
-
MessageTestTarget
MessageTestTarget(List<String> packagesToScan, ClassLoader classLoader)
-
MessageTestTarget
MessageTestTarget()
-
-
Method Detail
-
getUserConfig
Map<String, Object> getUserConfig()
Any user provided configuration
-
isHttpTarget
Boolean isHttpTarget()
If this is a request response (HTTP or HTTPS) target
-
getProviderInfo
IProviderInfo getProviderInfo(String serviceName, PactSource pactSource)
Returns information about the provider
-
prepareRequest
Pair<Object, Object> prepareRequest(Pact pact, Interaction interaction, Map<String, Object> context)
Prepares the request for the interaction.
-
prepareVerifier
Unit prepareVerifier(IProviderVerifier verifier, Object testInstance, Pact pact)
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)
-
-
-
-