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)
Group Id, artifact Id and classifier of a single stub to download in the latest
version
|
org.springframework.cloud.contract.stubrunner.junit.PortStubRunnerRuleOptions |
downloadStub(String ivyNotation)
Ivy notation of a single stub to download.
|
org.springframework.cloud.contract.stubrunner.junit.PortStubRunnerRuleOptions |
downloadStub(String groupId,
String artifactId)
Group Id, artifact Id of a single stub to download.
|
org.springframework.cloud.contract.stubrunner.junit.PortStubRunnerRuleOptions |
downloadStub(String groupId,
String artifactId,
String version)
Group Id, artifact Id and version of a single stub to download
|
org.springframework.cloud.contract.stubrunner.junit.PortStubRunnerRuleOptions |
downloadStub(String groupId,
String artifactId,
String version,
String classifier)
Group Id, artifact Id, version and classifier of a single stub to download
|
StubRunnerRule |
downloadStubs(List<String> ivyNotations)
Stubs to download in Ivy notations
|
StubRunnerRule |
downloadStubs(String... ivyNotations)
Stubs to download in Ivy notations
|
StubRunnerRule |
maxPort(int maxPort)
Max value of port for WireMock server
|
StubRunnerRule |
messageVerifier(MessageVerifier messageVerifier)
Pass the
MessageVerifier that this rule should use. |
StubRunnerRule |
minPort(int minPort)
Min value of port for WireMock server
|
StubRunnerRule |
options(StubRunnerOptions stubRunnerOptions)
Override all options
|
StubRunnerRule |
repoRoot(String repoRoot)
String URI of repository containing stubs
|
StubRunnerRule |
stubsMode(StubRunnerProperties.StubsMode stubsMode)
Stubs mode that should be used
|
StubRunnerRule |
withConsumerName(String consumerName)
Allows setting consumer name
|
StubRunnerRule |
withDeleteStubsAfterTest(boolean deleteStubsAfterTest)
If set to
false will NOT delete stubs from a temporary folder after running
tests |
StubRunnerRule |
withHttpServerStubConfigurer(Class<? extends HttpServerStubConfigurer> httpServerStubConfigurer)
Configuration for an HTTP server stub
|
StubRunnerRule |
withMappingsOutputFolder(String mappingsOutputFolder)
Allows setting the output folder for mappings
|
StubRunnerRule |
withPort(Integer port)
Appends port to last added stub
|
StubRunnerRule |
withProperties(Map<String,String> properties)
Map of properties that can be passed to custom
StubDownloaderBuilder |
StubRunnerRule |
withStubPerConsumer(boolean stubPerConsumer)
Allows stub per consumer
|
apply, downloadLatestStub, downloadStub, downloadStub, downloadStub, downloadStub, downloadStubs, downloadStubs, findAllRunningStubs, findStubUrl, findStubUrl, getContracts, labels, maxPort, messageVerifier, minPort, options, repoRoot, stubsMode, trigger, trigger, trigger, withConsumerName, withDeleteStubsAfterTest, withHttpServerStubConfigurer, withMappingsOutputFolder, withProperties, withStubPerConsumer
public StubRunnerRule withPort(Integer port)
public 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.public StubRunnerRule options(StubRunnerOptions stubRunnerOptions)
StubRunnerOptions
public StubRunnerRule minPort(int minPort)
public StubRunnerRule maxPort(int maxPort)
public StubRunnerRule repoRoot(String repoRoot)
public StubRunnerRule stubsMode(StubRunnerProperties.StubsMode stubsMode)
public org.springframework.cloud.contract.stubrunner.junit.PortStubRunnerRuleOptions downloadStub(String groupId, String artifactId, String version, String classifier)
public org.springframework.cloud.contract.stubrunner.junit.PortStubRunnerRuleOptions downloadLatestStub(String groupId, String artifactId, String classifier)
public org.springframework.cloud.contract.stubrunner.junit.PortStubRunnerRuleOptions downloadStub(String groupId, String artifactId, String version)
public org.springframework.cloud.contract.stubrunner.junit.PortStubRunnerRuleOptions downloadStub(String groupId, String artifactId)
public org.springframework.cloud.contract.stubrunner.junit.PortStubRunnerRuleOptions downloadStub(String ivyNotation)
public StubRunnerRule downloadStubs(String... ivyNotations)
public StubRunnerRule downloadStubs(List<String> ivyNotations)
public StubRunnerRule withStubPerConsumer(boolean stubPerConsumer)
public StubRunnerRule withConsumerName(String consumerName)
public StubRunnerRule withMappingsOutputFolder(String mappingsOutputFolder)
public StubRunnerRule withDeleteStubsAfterTest(boolean deleteStubsAfterTest)
false
will NOT delete stubs from a temporary folder after running
testspublic StubRunnerRule withProperties(Map<String,String> properties)
StubDownloaderBuilder
public StubRunnerRule withHttpServerStubConfigurer(Class<? extends HttpServerStubConfigurer> httpServerStubConfigurer)
Copyright © 2016–2019 Spring. All rights reserved.