Package org.kohsuke.github.junit
Class WireMockMultiServerRule
- java.lang.Object
-
- org.kohsuke.github.junit.WireMockMultiServerRule
-
- All Implemented Interfaces:
org.junit.rules.MethodRule,org.junit.rules.TestRule
- Direct Known Subclasses:
GitHubWireMockRule
public class WireMockMultiServerRule extends Object implements org.junit.rules.MethodRule, org.junit.rules.TestRule
The standard WireMockRule eagerly initializes a WireMockServer. This version supports multiple servers in one rule and takes a lazy approach to intitialization allowing us to isolate files snapshots for each method.- Author:
- Liam Newman
-
-
Constructor Summary
Constructors Constructor Description WireMockMultiServerRule()WireMockMultiServerRule(com.github.tomakehurst.wiremock.core.Options options)WireMockMultiServerRule(com.github.tomakehurst.wiremock.core.Options options, boolean failOnUnmatchedRequests)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidafter()org.junit.runners.model.Statementapply(org.junit.runners.model.Statement base, org.junit.runner.Description description)org.junit.runners.model.Statementapply(org.junit.runners.model.Statement base, org.junit.runners.model.FrameworkMethod method, Object target)protected voidbefore()StringgetMethodName()protected voidinitializeServer(String serverId, com.github.tomakehurst.wiremock.extension.Extension... extensions)protected voidinitializeServers()
-
-
-
Constructor Detail
-
WireMockMultiServerRule
public WireMockMultiServerRule(com.github.tomakehurst.wiremock.core.Options options)
-
WireMockMultiServerRule
public WireMockMultiServerRule(com.github.tomakehurst.wiremock.core.Options options, boolean failOnUnmatchedRequests)
-
WireMockMultiServerRule
public WireMockMultiServerRule()
-
-
Method Detail
-
getMethodName
public String getMethodName()
-
apply
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)- Specified by:
applyin interfaceorg.junit.rules.TestRule
-
apply
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runners.model.FrameworkMethod method, Object target)- Specified by:
applyin interfaceorg.junit.rules.MethodRule
-
initializeServers
protected void initializeServers()
-
initializeServer
protected final void initializeServer(String serverId, com.github.tomakehurst.wiremock.extension.Extension... extensions)
-
before
protected void before()
-
after
protected void after()
-
-