Package org.kohsuke.github.junit
Class GitHubWireMockRule
- java.lang.Object
-
- org.kohsuke.github.junit.WireMockMultiServerRule
-
- org.kohsuke.github.junit.GitHubWireMockRule
-
- All Implemented Interfaces:
org.junit.rules.MethodRule,org.junit.rules.TestRule
public class GitHubWireMockRule extends WireMockMultiServerRule
The standard WireMockRule eagerly initializes a WireMockServer. This version suptakes a laze approach allowing us to automatically isolate snapshots for each method.- Author:
- Liam Newman
-
-
Field Summary
-
Fields inherited from class org.kohsuke.github.junit.WireMockMultiServerRule
servers
-
-
Constructor Summary
Constructors Constructor Description GitHubWireMockRule()GitHubWireMockRule(com.github.tomakehurst.wiremock.core.WireMockConfiguration options)GitHubWireMockRule(com.github.tomakehurst.wiremock.core.WireMockConfiguration options, boolean failOnUnmatchedRequests)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.github.tomakehurst.wiremock.WireMockServeractionsUserContentServer()protected voidafter()com.github.tomakehurst.wiremock.WireMockServerapiServer()protected voidbefore()com.github.tomakehurst.wiremock.WireMockServercodeloadServer()intgetRequestCount()static intgetRequestCount(com.github.tomakehurst.wiremock.WireMockServer server)protected voidinitializeServers()booleanisTakeSnapshot()booleanisTestWithOrg()booleanisUseProxy()StringmapToMockGitHub(String body)com.github.tomakehurst.wiremock.WireMockServerrawServer()com.github.tomakehurst.wiremock.WireMockServeruploadsServer()-
Methods inherited from class org.kohsuke.github.junit.WireMockMultiServerRule
apply, apply, getMethodName, initializeServer
-
-
-
-
Constructor Detail
-
GitHubWireMockRule
public GitHubWireMockRule()
-
GitHubWireMockRule
public GitHubWireMockRule(com.github.tomakehurst.wiremock.core.WireMockConfiguration options)
-
GitHubWireMockRule
public GitHubWireMockRule(com.github.tomakehurst.wiremock.core.WireMockConfiguration options, boolean failOnUnmatchedRequests)
-
-
Method Detail
-
apiServer
public com.github.tomakehurst.wiremock.WireMockServer apiServer()
-
rawServer
public com.github.tomakehurst.wiremock.WireMockServer rawServer()
-
uploadsServer
public com.github.tomakehurst.wiremock.WireMockServer uploadsServer()
-
codeloadServer
public com.github.tomakehurst.wiremock.WireMockServer codeloadServer()
-
actionsUserContentServer
public com.github.tomakehurst.wiremock.WireMockServer actionsUserContentServer()
-
isUseProxy
public boolean isUseProxy()
-
isTakeSnapshot
public boolean isTakeSnapshot()
-
isTestWithOrg
public boolean isTestWithOrg()
-
initializeServers
protected void initializeServers()
- Overrides:
initializeServersin classWireMockMultiServerRule
-
before
protected void before()
- Overrides:
beforein classWireMockMultiServerRule
-
after
protected void after()
- Overrides:
afterin classWireMockMultiServerRule
-
getRequestCount
public int getRequestCount()
-
getRequestCount
public static int getRequestCount(com.github.tomakehurst.wiremock.WireMockServer server)
-
-