Package au.com.dius.pact.consumer
Class PluginMockServer
-
- All Implemented Interfaces:
-
au.com.dius.pact.consumer.MockServer
public final class PluginMockServer extends BaseMockServer
Mock server provided by a plugin
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classPluginMockServer.Companion
-
Field Summary
Fields Modifier and Type Field Description private PluginManagerpluginManagerprivate final ConcurrentHashMap<IRequest, List<PactVerificationResult>>mismatchedRequestsprivate final ConcurrentLinkedQueue<Pair<IRequest, IRequest>>matchedRequestsprivate final BasePactpactprivate final MockProviderConfigconfigpublic final static PluginMockServer.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description PluginMockServer(BasePact pact, MockProviderConfig config)
-
Method Summary
Modifier and Type Method Description final PluginManagergetPluginManager()Public for testing final UnitsetPluginManager(PluginManager pluginManager)Public for testing Unitstart()UnitwaitForServer()Unitstop()StringgetUrl()Returns the URL for this mock server. IntegergetPort()Returns the port of the mock server. PactupdatePact(Pact pact)Lets the mock server annotate the Pact when ready to be written PactVerificationResultvalidateMockServerState(Object testResult)Returns the results of validating the mock server state -
Methods inherited from class au.com.dius.pact.consumer.BaseMockServer
getConfig, getMatchedRequests, getMismatchedRequests, getPact, runAndWritePact, verifyResultAndWritePact -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
PluginMockServer
PluginMockServer(BasePact pact, MockProviderConfig config)
-
-
Method Detail
-
getPluginManager
final PluginManager getPluginManager()
Public for testing
-
setPluginManager
final Unit setPluginManager(PluginManager pluginManager)
Public for testing
-
waitForServer
Unit waitForServer()
-
getUrl
String getUrl()
Returns the URL for this mock server. The port will be the one bound by the server.
-
getPort
Integer getPort()
Returns the port of the mock server. This will be the port the server is bound to.
-
updatePact
Pact updatePact(Pact pact)
Lets the mock server annotate the Pact when ready to be written
-
validateMockServerState
PactVerificationResult validateMockServerState(Object testResult)
Returns the results of validating the mock server state
-
-
-
-