Package com.foreach.across.test.support
Class AcrossTestBuilders
java.lang.Object
com.foreach.across.test.support.AcrossTestBuilders
Helper for creating relevant
AcrossTestContext
builders.
Can be used as static imports.
Example: using AcrossTestBuilders
as a static import boilerplate code
new AcrossTestWebContextBuilder()
can be reduced to web()
.
- Since:
- 1.1.2
- Author:
- Arne Vandamme
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic AcrossTestContextBuilder
standard()
Create a new builder for a standard (non-web)AcrossContext
.static AcrossTestContextBuilder
standard
(boolean useTestDataSource) Create a new builder for a standard (non-web)AcrossContext
.static AcrossTestWebContextBuilder
web()
Create a new builder for a web basedAcrossContext
.static AcrossTestWebContextBuilder
web
(boolean useTestDataSource) Create a new builder for a web basedAcrossContext
.
-
Constructor Details
-
AcrossTestBuilders
public AcrossTestBuilders()
-
-
Method Details
-
standard
Create a new builder for a standard (non-web)AcrossContext
. This builder will create aAcrossTestContext
.- Parameters:
useTestDataSource
- true if integration test datasource should be used (default)- Returns:
- builder instance
-
standard
Create a new builder for a standard (non-web)AcrossContext
. This builder will create aAcrossTestContext
.- Returns:
- builder instance
-
web
Create a new builder for a web basedAcrossContext
. This will ensure aServletContext
is initialized and SpringWebApplicationContext
is being used. This builder will create aAcrossTestWebContext
with support forMockMvc
.- Parameters:
useTestDataSource
- true if integration test datasource should be used (default)- Returns:
- builder instance
-
web
Create a new builder for a web basedAcrossContext
. This will ensure aServletContext
is initialized and SpringWebApplicationContext
is being used. This builder will create aAcrossTestWebContext
with support forMockMvc
.- Returns:
- builder instance
-