public class WervalTest extends Object implements WervalTestSupport
Activate/Passivate Werval Application 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.
HttpBuildersSPI.RequestBuilder
HttpBuilders.CookieBuilder
Constructor and Description |
---|
WervalTest() |
Modifier and Type | Method and Description |
---|---|
void |
afterEachTestMethod()
Passivate Application.
|
ApplicationSPI |
application() |
void |
beforeEachTestMethod()
Activate Application.
|
protected String |
configurationResourceName()
Override to provide your own configuration.
|
HttpBuilders.CookieBuilder |
newCookieBuilder()
Create a new Cookie Builder.
|
HttpBuildersSPI.RequestBuilder |
newRequestBuilder()
Create a new Request Builder.
|
protected io.werval.runtime.routes.RoutesProvider |
routesProvider()
Override to provide your own routes.
|
public final void beforeEachTestMethod()
public final void afterEachTestMethod()
public final ApplicationSPI application()
application
in interface
WervalTestSupport
public HttpBuildersSPI.RequestBuilder newRequestBuilder()
HttpBuildersSPI
HTTP Method and URI are mandatory.
newRequestBuilder
in interface
HttpBuildersSPI
public HttpBuilders.CookieBuilder newCookieBuilder()
HttpBuilders
Name is mandatory.
newCookieBuilder
in interface
HttpBuilders
protected String configurationResourceName()
protected io.werval.runtime.routes.RoutesProvider routesProvider()