-
- All Implemented Interfaces:
-
au.com.dius.pact.consumer.MockServer
public abstract class BaseMockServer extends AbstractBaseMockServer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
BaseMockServer.Companion
-
Field Summary
Fields Modifier and Type Field Description private final BasePact
pact
private final MockProviderConfig
config
-
Constructor Summary
Constructors Constructor Description BaseMockServer(BasePact pact, MockProviderConfig config)
-
Method Summary
Modifier and Type Method Description final BasePact
getPact()
final MockProviderConfig
getConfig()
Unit
waitForServer()
<R extends Any> PactVerificationResult
runAndWritePact(BasePact pact, PactSpecVersion pactVersion, PactTestRun<R> testFn)
This will start the mock server and execute the test function. final <R extends Any> PactVerificationResult
verifyResultAndWritePact(R testResult, PactTestExecutionContext context, BasePact pact, PactSpecVersion pactVersion)
PactVerificationResult
validateMockServerState(Object testResult)
Returns the results of validating the mock server state -
Methods inherited from class au.com.dius.pact.consumer.BaseMockServer
start, stop
-
Methods inherited from class au.com.dius.pact.consumer.AbstractBaseMockServer
getPort, getUrl
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
BaseMockServer
BaseMockServer(BasePact pact, MockProviderConfig config)
-
-
Method Detail
-
getPact
final BasePact getPact()
-
getConfig
final MockProviderConfig getConfig()
-
waitForServer
Unit waitForServer()
-
runAndWritePact
<R extends Any> PactVerificationResult runAndWritePact(BasePact pact, PactSpecVersion pactVersion, PactTestRun<R> testFn)
This will start the mock server and execute the test function. Returns the result of running the test.
-
verifyResultAndWritePact
final <R extends Any> PactVerificationResult verifyResultAndWritePact(R testResult, PactTestExecutionContext context, BasePact pact, PactSpecVersion pactVersion)
-
validateMockServerState
PactVerificationResult validateMockServerState(Object testResult)
Returns the results of validating the mock server state
-
-
-
-