public class WervalHttpTest extends Object implements WervalHttpTestSupport
Activate/Passivate Werval Application and HTTP Server in test mode around each JUnit test method.
By default, configuration is loaded from the application.conf
file. Override the configurationResourceName()
method to provide your own test configuration.
By default, routes are loaded from the routes.conf
file. Override the routesProvider()
method to provide your own test routes.
Constructor and Description |
---|
WervalHttpTest() |
WervalHttpTest(io.werval.runtime.routes.RoutesProvider routesProviderOverride) |
WervalHttpTest(String configurationResourceNameOverride) |
WervalHttpTest(String configurationResourceNameOverride, io.werval.runtime.routes.RoutesProvider routesProviderOverride) |
Modifier and Type | Method and Description |
---|---|
void |
afterEachTestMethod()
Passivate HttpServer.
|
ApplicationSPI |
application() |
String |
baseHttpUrl() |
void |
beforeEachTestMethod()
Activate HttpServer.
|
protected String |
configurationResourceName()
Override to provide your own configuration.
|
String |
httpHost() |
int |
httpPort() |
protected io.werval.runtime.routes.RoutesProvider |
routesProvider()
Override to provide your own routes.
|
public WervalHttpTest()
public WervalHttpTest(String configurationResourceNameOverride)
public WervalHttpTest(io.werval.runtime.routes.RoutesProvider routesProviderOverride)
public WervalHttpTest(String configurationResourceNameOverride, io.werval.runtime.routes.RoutesProvider routesProviderOverride)
public final void beforeEachTestMethod()
public final void afterEachTestMethod()
public final ApplicationSPI application()
application
in interface
WervalHttpTestSupport
public final String httpHost()
httpHost
in interface
WervalHttpTestSupport
public final int httpPort()
httpPort
in interface
WervalHttpTestSupport
public final String baseHttpUrl()
baseHttpUrl
in interface
WervalHttpTestSupport
protected String configurationResourceName()
protected io.werval.runtime.routes.RoutesProvider routesProvider()