public class BaseMockServer implements MockServer
public BaseMockServer(@NotNull au.com.dius.pact.core.model.RequestResponsePact pact, @NotNull MockProviderConfig config)
public void start()
public void stop()
public void waitForServer()
@NotNull public <R> PactVerificationResult runAndWritePact(@NotNull au.com.dius.pact.core.model.RequestResponsePact pact, @NotNull au.com.dius.pact.core.model.PactSpecVersion pactVersion, @NotNull PactTestRun<R> testFn)
This will start the mock server and execute the test function. Returns the result of running the test.
@NotNull public <R> PactVerificationResult verifyResultAndWritePact(R testResult, @NotNull PactTestExecutionContext context, @NotNull au.com.dius.pact.core.model.RequestResponsePact pact, @NotNull au.com.dius.pact.core.model.PactSpecVersion pactVersion)
@NotNull public PactVerificationResult validateMockServerState(@Nullable java.lang.Object testResult)
Returns the results of validating the mock server state
@NotNull protected au.com.dius.pact.core.model.Response generatePactResponse(@NotNull au.com.dius.pact.core.model.Request request)
@NotNull public au.com.dius.pact.core.model.RequestResponsePact getPact()
@NotNull public MockProviderConfig getConfig()