@FunctionalInterface
public interface SimulationSource
| Modifier and Type | Method and Description |
|---|---|
static SimulationSource |
classpath(java.lang.String classpath)
Creates a simulation from the classpath
|
static SimulationSource |
defaultPath(java.lang.String pathString)
Creates a simulation from the file located in default hoverfly resource path which is relative to src/test/resources/hoverfly
|
static SimulationSource |
dsl(StubServiceBuilder... stubServiceBuilder)
Creates a simulation from the dsl
You can pass in multiple
StubServiceBuilder to simulate services with different base urls |
static SimulationSource |
empty()
Creates no simulation
|
static SimulationSource |
file(java.nio.file.Path path)
Creates a simulation from a file
|
java.lang.String |
getSimulation() |
static SimulationSource |
simulation(Simulation simulation)
Creates a simulation from a
Simulation object |
static SimulationSource |
url(java.lang.String url)
Creates a simulation from a URL string
|
static SimulationSource |
url(java.net.URL url)
Creates a simulation from a URL
|
static SimulationSource url(java.net.URL url)
url - the url of the simulationstatic SimulationSource url(java.lang.String url)
url - the url of the simulationstatic SimulationSource classpath(java.lang.String classpath)
classpath - the classpath of the simulationstatic SimulationSource defaultPath(java.lang.String pathString)
pathString - path string relative to the default hoverfly resource pathstatic SimulationSource file(java.nio.file.Path path)
path - the file path of the simulationstatic SimulationSource dsl(StubServiceBuilder... stubServiceBuilder)
StubServiceBuilder to simulate services with different base urlsstubServiceBuilder - the fluent builder for RequestResponsePairHoverflyDslstatic SimulationSource simulation(Simulation simulation)
Simulation objectsimulation - the simulationstatic SimulationSource empty()
java.lang.String getSimulation()