Interface IProviderVerifier
-
- All Implemented Interfaces:
public interface IProviderVerifierInterface to the provider verifier
-
-
Method Summary
Modifier and Type Method Description abstract List<VerificationResult>verifyProvider(IProviderInfo provider)Run the verification for the given provider and return any failures abstract UnitreportStateForInteraction(String state, IProviderInfo provider, IConsumerInfo consumer, Boolean isSetup)Reports the state of the interaction to all the registered reporters abstract UnitfinaliseReports()Finalise all the reports after verification is complete abstract UnitdisplayFailures(List<VerificationResult.Failed> failures)Displays all the failures from the verification run abstract VerificationResultverifyResponseFromProvider(IProviderInfo provider, SynchronousRequestResponse interaction, String interactionMessage, Map<String, Object> failures, ProviderClient client)Verifies the response from the provider against the interaction abstract VerificationResultverifyResponseFromProvider(IProviderInfo provider, SynchronousRequestResponse interaction, String interactionMessage, Map<String, Object> failures, ProviderClient client, Map<String, Object> context, Boolean pending)Verifies the response from the provider against the interaction abstract VerificationResultverifyResponseByInvokingProviderMethods(IProviderInfo providerInfo, IConsumerInfo consumer, Interaction interaction, String interactionMessage, Map<String, Object> failures, Boolean pending)Verifies the interaction by invoking a method on a provider test class abstract VerificationResultverifyResponseByInvokingProviderMethods(IProviderInfo providerInfo, IConsumerInfo consumer, Interaction interaction, String interactionMessage, Map<String, Object> failures, Boolean pending, Map<String, PluginConfiguration> pluginConfiguration)Verifies the interaction by invoking a method on a provider test class abstract VerificationResultverifyResponseByFactory(IProviderInfo providerInfo, IConsumerInfo consumer, Interaction interaction, String interactionMessage, Map<String, Object> failures, Boolean pending)abstract VerificationResultverifyResponseByFactory(IProviderInfo providerInfo, IConsumerInfo consumer, Interaction interaction, String interactionMessage, Map<String, Object> failures, Boolean pending, Map<String, PluginConfiguration> pluginConfiguration)abstract VerificationResultverifyRequestResponsePact(IResponse expectedResponse, ProviderResponse actualResponse, String interactionMessage, Map<String, Object> failures, String interactionId, Boolean pending, Map<String, PluginConfiguration> pluginConfiguration)Compares the expected and actual responses VerificationResultverifyRequestResponsePact(IResponse expectedResponse, ProviderResponse actualResponse, String interactionMessage, Map<String, Object> failures, String interactionId, Boolean pending)Compares the expected and actual responses abstract BooleanpublishingResultsDisabled()If publishing of verification results has been disabled abstract UnitreportInteractionDescription(Interaction interaction)Display info about the interaction about to be verified abstract StringgenerateErrorStringFromVerificationResult(List<VerificationResult.Failed> result)abstract UnitreportStateChangeFailed(ProviderState providerState, Exception error, Boolean isSetup)abstract UnitinitialiseReporters(IProviderInfo provider)abstract UnitreportVerificationForConsumer(IConsumerInfo consumer, IProviderInfo provider, PactSource pactSource)abstract VerificationResultverifyInteractionViaPlugin(IProviderInfo providerInfo, IConsumerInfo consumer, V4Pact pact, V4Interaction interaction, Object client, Object request, Map<String, Object> context)Verification executed by a plugin abstract UnitdisplayOutput(List<String> output)Display any output to the user abstract List<VerifierReporter>getReporters()List of the all reporters to report the results of the verification to abstract UnitsetReporters(List<VerifierReporter> reporters)List of the all reporters to report the results of the verification to abstract Function<Object, Boolean>getCheckBuildSpecificTask()Callback to determine if something is a build specific task abstract UnitsetCheckBuildSpecificTask(Function<Object, Boolean> checkBuildSpecificTask)Callback to determine if something is a build specific task abstract BiConsumer<Object, ProviderState>getExecuteBuildSpecificTask()Consumer SAM to execute the build specific task abstract UnitsetExecuteBuildSpecificTask(BiConsumer<Object, ProviderState> executeBuildSpecificTask)Consumer SAM to execute the build specific task abstract Function<String, Boolean>getProjectHasProperty()Callback to determine is the project has a particular property abstract UnitsetProjectHasProperty(Function<String, Boolean> projectHasProperty)Callback to determine is the project has a particular property abstract Function<String, String>getProjectGetProperty()Callback to fetch a project property abstract UnitsetProjectGetProperty(Function<String, String> projectGetProperty)Callback to fetch a project property abstract Function<Method, Object>getProviderMethodInstance()Callback to return the instance for the provider method to invoke abstract UnitsetProviderMethodInstance(Function<Method, Object> providerMethodInstance)Callback to return the instance for the provider method to invoke abstract Supplier<ClassLoader>getProjectClassLoader()Callback to return the project classloader to use for looking up methods abstract UnitsetProjectClassLoader(Supplier<ClassLoader> projectClassLoader)Callback to return the project classloader to use for looking up methods abstract Supplier<List<URL>>getProjectClasspath()Callback to return the project classpath to use for looking up methods abstract UnitsetProjectClasspath(Supplier<List<URL>> projectClasspath)Callback to return the project classpath to use for looking up methods abstract ObjectgetPactLoadFailureMessage()Callback to display a pact load error abstract UnitsetPactLoadFailureMessage(Object pactLoadFailureMessage)Callback to display a pact load error abstract Supplier<String>getProviderVersion()Callback to get the provider version abstract UnitsetProviderVersion(Supplier<String> providerVersion)Callback to get the provider version abstract Supplier<String>getProviderTag()Callback to get the provider tag abstract UnitsetProviderTag(@Deprecated(message = "Use version that returns multiple tags", replaceWith = @ReplaceWith(imports = {}, expression = "providerTags")) Supplier<String> providerTag)Callback to get the provider tag abstract Supplier<String>getProviderBranch()Callback to get the provider branch abstract UnitsetProviderBranch(Supplier<String> providerBranch)Callback to get the provider branch abstract Supplier<List<String>>getProviderTags()Callback to get the provider tags abstract UnitsetProviderTags(Supplier<List<String>> providerTags)Callback to get the provider tags abstract Function<String, Object>getResponseFactory()Callback which is given an interaction description and returns a response abstract UnitsetResponseFactory(Function<String, Object> responseFactory)Callback which is given an interaction description and returns a response abstract StringgetVerificationSource()Source of the verification (Gradle/Maven/Junit) abstract UnitsetVerificationSource(String verificationSource)Source of the verification (Gradle/Maven/Junit) -
-
Method Detail
-
verifyProvider
abstract List<VerificationResult> verifyProvider(IProviderInfo provider)
Run the verification for the given provider and return any failures
-
reportStateForInteraction
abstract Unit reportStateForInteraction(String state, IProviderInfo provider, IConsumerInfo consumer, Boolean isSetup)
Reports the state of the interaction to all the registered reporters
-
finaliseReports
abstract Unit finaliseReports()
Finalise all the reports after verification is complete
-
displayFailures
abstract Unit displayFailures(List<VerificationResult.Failed> failures)
Displays all the failures from the verification run
-
verifyResponseFromProvider
abstract VerificationResult verifyResponseFromProvider(IProviderInfo provider, SynchronousRequestResponse interaction, String interactionMessage, Map<String, Object> failures, ProviderClient client)
Verifies the response from the provider against the interaction
-
verifyResponseFromProvider
abstract VerificationResult verifyResponseFromProvider(IProviderInfo provider, SynchronousRequestResponse interaction, String interactionMessage, Map<String, Object> failures, ProviderClient client, Map<String, Object> context, Boolean pending)
Verifies the response from the provider against the interaction
-
verifyResponseByInvokingProviderMethods
@Deprecated(message = "Use the version that passes in any plugin configuration") abstract VerificationResult verifyResponseByInvokingProviderMethods(IProviderInfo providerInfo, IConsumerInfo consumer, Interaction interaction, String interactionMessage, Map<String, Object> failures, Boolean pending)
Verifies the interaction by invoking a method on a provider test class
-
verifyResponseByInvokingProviderMethods
abstract VerificationResult verifyResponseByInvokingProviderMethods(IProviderInfo providerInfo, IConsumerInfo consumer, Interaction interaction, String interactionMessage, Map<String, Object> failures, Boolean pending, Map<String, PluginConfiguration> pluginConfiguration)
Verifies the interaction by invoking a method on a provider test class
-
verifyResponseByFactory
@Deprecated(message = "Use the version that passes in any plugin configuration") abstract VerificationResult verifyResponseByFactory(IProviderInfo providerInfo, IConsumerInfo consumer, Interaction interaction, String interactionMessage, Map<String, Object> failures, Boolean pending)
-
verifyResponseByFactory
abstract VerificationResult verifyResponseByFactory(IProviderInfo providerInfo, IConsumerInfo consumer, Interaction interaction, String interactionMessage, Map<String, Object> failures, Boolean pending, Map<String, PluginConfiguration> pluginConfiguration)
-
verifyRequestResponsePact
abstract VerificationResult verifyRequestResponsePact(IResponse expectedResponse, ProviderResponse actualResponse, String interactionMessage, Map<String, Object> failures, String interactionId, Boolean pending, Map<String, PluginConfiguration> pluginConfiguration)
Compares the expected and actual responses
-
verifyRequestResponsePact
@Deprecated(message = "Use the version that passes in any plugin configuration") VerificationResult verifyRequestResponsePact(IResponse expectedResponse, ProviderResponse actualResponse, String interactionMessage, Map<String, Object> failures, String interactionId, Boolean pending)
Compares the expected and actual responses
-
publishingResultsDisabled
abstract Boolean publishingResultsDisabled()
If publishing of verification results has been disabled
-
reportInteractionDescription
abstract Unit reportInteractionDescription(Interaction interaction)
Display info about the interaction about to be verified
-
generateErrorStringFromVerificationResult
abstract String generateErrorStringFromVerificationResult(List<VerificationResult.Failed> result)
-
reportStateChangeFailed
abstract Unit reportStateChangeFailed(ProviderState providerState, Exception error, Boolean isSetup)
-
initialiseReporters
abstract Unit initialiseReporters(IProviderInfo provider)
-
reportVerificationForConsumer
abstract Unit reportVerificationForConsumer(IConsumerInfo consumer, IProviderInfo provider, PactSource pactSource)
-
verifyInteractionViaPlugin
abstract VerificationResult verifyInteractionViaPlugin(IProviderInfo providerInfo, IConsumerInfo consumer, V4Pact pact, V4Interaction interaction, Object client, Object request, Map<String, Object> context)
Verification executed by a plugin
-
displayOutput
abstract Unit displayOutput(List<String> output)
Display any output to the user
-
getReporters
abstract List<VerifierReporter> getReporters()
List of the all reporters to report the results of the verification to
-
setReporters
abstract Unit setReporters(List<VerifierReporter> reporters)
List of the all reporters to report the results of the verification to
-
getCheckBuildSpecificTask
abstract Function<Object, Boolean> getCheckBuildSpecificTask()
Callback to determine if something is a build specific task
-
setCheckBuildSpecificTask
abstract Unit setCheckBuildSpecificTask(Function<Object, Boolean> checkBuildSpecificTask)
Callback to determine if something is a build specific task
-
getExecuteBuildSpecificTask
abstract BiConsumer<Object, ProviderState> getExecuteBuildSpecificTask()
Consumer SAM to execute the build specific task
-
setExecuteBuildSpecificTask
abstract Unit setExecuteBuildSpecificTask(BiConsumer<Object, ProviderState> executeBuildSpecificTask)
Consumer SAM to execute the build specific task
-
getProjectHasProperty
abstract Function<String, Boolean> getProjectHasProperty()
Callback to determine is the project has a particular property
-
setProjectHasProperty
abstract Unit setProjectHasProperty(Function<String, Boolean> projectHasProperty)
Callback to determine is the project has a particular property
-
getProjectGetProperty
abstract Function<String, String> getProjectGetProperty()
Callback to fetch a project property
-
setProjectGetProperty
abstract Unit setProjectGetProperty(Function<String, String> projectGetProperty)
Callback to fetch a project property
-
getProviderMethodInstance
abstract Function<Method, Object> getProviderMethodInstance()
Callback to return the instance for the provider method to invoke
-
setProviderMethodInstance
abstract Unit setProviderMethodInstance(Function<Method, Object> providerMethodInstance)
Callback to return the instance for the provider method to invoke
-
getProjectClassLoader
abstract Supplier<ClassLoader> getProjectClassLoader()
Callback to return the project classloader to use for looking up methods
-
setProjectClassLoader
abstract Unit setProjectClassLoader(Supplier<ClassLoader> projectClassLoader)
Callback to return the project classloader to use for looking up methods
-
getProjectClasspath
abstract Supplier<List<URL>> getProjectClasspath()
Callback to return the project classpath to use for looking up methods
-
setProjectClasspath
abstract Unit setProjectClasspath(Supplier<List<URL>> projectClasspath)
Callback to return the project classpath to use for looking up methods
-
getPactLoadFailureMessage
abstract Object getPactLoadFailureMessage()
Callback to display a pact load error
-
setPactLoadFailureMessage
abstract Unit setPactLoadFailureMessage(Object pactLoadFailureMessage)
Callback to display a pact load error
-
getProviderVersion
abstract Supplier<String> getProviderVersion()
Callback to get the provider version
-
setProviderVersion
abstract Unit setProviderVersion(Supplier<String> providerVersion)
Callback to get the provider version
-
getProviderTag
abstract Supplier<String> getProviderTag()
Callback to get the provider tag
-
setProviderTag
abstract Unit setProviderTag(@Deprecated(message = "Use version that returns multiple tags", replaceWith = @ReplaceWith(imports = {}, expression = "providerTags")) Supplier<String> providerTag)
Callback to get the provider tag
-
getProviderBranch
abstract Supplier<String> getProviderBranch()
Callback to get the provider branch
-
setProviderBranch
abstract Unit setProviderBranch(Supplier<String> providerBranch)
Callback to get the provider branch
-
getProviderTags
abstract Supplier<List<String>> getProviderTags()
Callback to get the provider tags
-
setProviderTags
abstract Unit setProviderTags(Supplier<List<String>> providerTags)
Callback to get the provider tags
-
getResponseFactory
abstract Function<String, Object> getResponseFactory()
Callback which is given an interaction description and returns a response
-
setResponseFactory
abstract Unit setResponseFactory(Function<String, Object> responseFactory)
Callback which is given an interaction description and returns a response
-
getVerificationSource
abstract String getVerificationSource()
Source of the verification (Gradle/Maven/Junit)
-
setVerificationSource
abstract Unit setVerificationSource(String verificationSource)
Source of the verification (Gradle/Maven/Junit)
-
-
-
-