public static class StubRunnerRule.PortStubRunnerRule extends StubRunnerRule
StubRunnerRule.PortStubRunnerRule| Modifier and Type | Method and Description |
|---|---|
org.springframework.cloud.contract.stubrunner.junit.PortStubRunnerRuleOptions |
downloadLatestStub(String groupId,
String artifactId,
String classifier) |
org.springframework.cloud.contract.stubrunner.junit.PortStubRunnerRuleOptions |
downloadStub(String ivyNotation) |
org.springframework.cloud.contract.stubrunner.junit.PortStubRunnerRuleOptions |
downloadStub(String groupId,
String artifactId) |
org.springframework.cloud.contract.stubrunner.junit.PortStubRunnerRuleOptions |
downloadStub(String groupId,
String artifactId,
String version) |
org.springframework.cloud.contract.stubrunner.junit.PortStubRunnerRuleOptions |
downloadStub(String groupId,
String artifactId,
String version,
String classifier) |
StubRunnerRule |
downloadStubs(List<String> ivyNotations) |
StubRunnerRule |
downloadStubs(String... ivyNotations) |
StubRunnerRule |
failOnNoStubs(boolean failOnNoStubs) |
StubRunnerRule |
maxPort(int maxPort) |
StubRunnerRule |
messageVerifier(MessageVerifier messageVerifier)
Pass the
MessageVerifier that this rule should use. |
StubRunnerRule |
minPort(int minPort) |
StubRunnerRule |
options(StubRunnerOptions stubRunnerOptions)
Override all options.
|
StubRunnerRule |
repoRoot(String repoRoot) |
StubRunnerRule |
stubsMode(StubRunnerProperties.StubsMode stubsMode) |
StubRunnerRule |
withConsumerName(String consumerName) |
StubRunnerRule |
withDeleteStubsAfterTest(boolean deleteStubsAfterTest) |
StubRunnerRule |
withGenerateStubs(boolean generateStubs) |
StubRunnerRule |
withHttpServerStubConfigurer(Class<? extends HttpServerStubConfigurer> httpServerStubConfigurer) |
StubRunnerRule |
withMappingsOutputFolder(String mappingsOutputFolder) |
StubRunnerRule |
withPort(Integer port)
Appends port to last added stub.
|
StubRunnerRule |
withProperties(Map<String,String> properties) |
StubRunnerRule |
withStubPerConsumer(boolean stubPerConsumer) |
apply, downloadLatestStub, downloadStub, downloadStub, downloadStub, downloadStub, downloadStubs, downloadStubs, failOnNoStubs, findAllRunningStubs, findStubUrl, findStubUrl, getContracts, labels, maxPort, messageVerifier, minPort, options, repoRoot, stubsMode, trigger, trigger, trigger, withConsumerName, withDeleteStubsAfterTest, withGenerateStubs, withHttpServerStubConfigurer, withMappingsOutputFolder, withProperties, withStubPerConsumerpublic StubRunnerRule withPort(Integer port)
port - port at which the stub will be ranpublic StubRunnerRule messageVerifier(MessageVerifier messageVerifier)
MessageVerifier that this rule should use. If you don't pass
anything a ExceptionThrowingMessageVerifier will be used. That means that
an exception will be thrown whenever you try to do sth messaging related.messageVerifier - message verifier implementationpublic StubRunnerRule options(StubRunnerOptions stubRunnerOptions)
stubRunnerOptions - options of Stub RunnerStubRunnerOptionspublic StubRunnerRule minPort(int minPort)
minPort - min value of port for WireMock serverpublic StubRunnerRule maxPort(int maxPort)
maxPort - max value of port for WireMock serverpublic StubRunnerRule repoRoot(String repoRoot)
repoRoot - String URI of repository containing stubspublic StubRunnerRule stubsMode(StubRunnerProperties.StubsMode stubsMode)
stubsMode - Stubs mode that should be usedpublic org.springframework.cloud.contract.stubrunner.junit.PortStubRunnerRuleOptions downloadStub(String groupId, String artifactId, String version, String classifier)
groupId - group id of the stubartifactId - artifact id of the stubversion - version of the stubclassifier - classifier of the stubpublic org.springframework.cloud.contract.stubrunner.junit.PortStubRunnerRuleOptions downloadLatestStub(String groupId, String artifactId, String classifier)
groupId - group id of the stubartifactId - artifact id of the stubclassifier - classifier of the stubpublic org.springframework.cloud.contract.stubrunner.junit.PortStubRunnerRuleOptions downloadStub(String groupId, String artifactId, String version)
groupId - group id of the stubartifactId - artifact id of the stubversion - version of the stubpublic org.springframework.cloud.contract.stubrunner.junit.PortStubRunnerRuleOptions downloadStub(String groupId, String artifactId)
groupId - group id of the stubartifactId - artifact id of the stubpublic org.springframework.cloud.contract.stubrunner.junit.PortStubRunnerRuleOptions downloadStub(String ivyNotation)
ivyNotation - Ivy notation of a single stub to download.public StubRunnerRule downloadStubs(String... ivyNotations)
ivyNotations - Stubs to download in Ivy notations.public StubRunnerRule downloadStubs(List<String> ivyNotations)
ivyNotations - Stubs to download in Ivy notations.public StubRunnerRule withStubPerConsumer(boolean stubPerConsumer)
stubPerConsumer - Allows stub per consumer.public StubRunnerRule withConsumerName(String consumerName)
consumerName - given consumer namepublic StubRunnerRule withMappingsOutputFolder(String mappingsOutputFolder)
mappingsOutputFolder - Allows setting the output folder for mappingspublic StubRunnerRule withDeleteStubsAfterTest(boolean deleteStubsAfterTest)
deleteStubsAfterTest - If set to false will NOT delete stubs from a
temporary folder after running testspublic StubRunnerRule withGenerateStubs(boolean generateStubs)
generateStubs - If set to true will NOT load generated stubs but will
generate stubs from contract definitions at runtime.public StubRunnerRule failOnNoStubs(boolean failOnNoStubs)
failOnNoStubs - when enabled, this flag will tell stub runner to throw an
exception when no stubs / contracts were found.public StubRunnerRule withProperties(Map<String,String> properties)
properties - Map of properties that can be passed to custom
StubDownloaderBuilderpublic StubRunnerRule withHttpServerStubConfigurer(Class<? extends HttpServerStubConfigurer> httpServerStubConfigurer)
httpServerStubConfigurer - Configuration for an HTTP server stubCopyright © 2016–2021 Spring. All rights reserved.