public class RestxSpecRule extends RestxServerRule
server, webServerSupplier| Constructor and Description |
|---|
RestxSpecRule()
A shortcut for new RestxSpecRule("/api", queryByClass(WebServerSupplier.class), Factory.getInstance())
|
RestxSpecRule(String routerPath)
A shortcut for new RestxSpecRule(routerPath, queryByClass(WebServerSupplier.class), Factory.getInstance())
|
RestxSpecRule(String routerPath,
WebServerSupplier webServerSupplier,
Factory factory)
Constructs a new RestxSpecRule.
|
RestxSpecRule(WebServerSupplier webServerSupplier)
A shortcut for new RestxSpecRule("/api", webServerSupplier, Factory.getInstance())
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterServerCreated() |
protected void |
beforeServerStop() |
RestxSpec |
loadSpec(String spec) |
void |
runTest(RestxSpec restxSpec) |
void |
runTest(String spec) |
afterServerStarted, afterServerStop, apply, client, getMode, getServer, setMode, setup, tearDownpublic RestxSpecRule()
public RestxSpecRule(String routerPath)
public RestxSpecRule(WebServerSupplier webServerSupplier)
public RestxSpecRule(String routerPath, WebServerSupplier webServerSupplier, Factory factory)
routerPath - the path at which restx router is mounted. eg '/api'webServerSupplier - a supplier of WebServer, you can use #jettyWebServerSupplier for jetty.factory - the restx Factory to use to find GivenSpecRuleSupplier s when executing the spec.
This is not used for the server itself.public void runTest(String spec) throws IOException
IOExceptionpublic RestxSpec loadSpec(String spec) throws IOException
IOExceptionpublic void runTest(RestxSpec restxSpec)
protected void afterServerCreated()
afterServerCreated in class RestxServerRuleprotected void beforeServerStop()
beforeServerStop in class RestxServerRuleCopyright © 2017. All Rights Reserved.