Class AcrossTestBuilders

java.lang.Object
com.foreach.across.test.support.AcrossTestBuilders

public abstract class AcrossTestBuilders extends Object
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 Details

    • AcrossTestBuilders

      public AcrossTestBuilders()
  • Method Details

    • standard

      public static AcrossTestContextBuilder standard(boolean useTestDataSource)
      Create a new builder for a standard (non-web) AcrossContext. This builder will create a AcrossTestContext.
      Parameters:
      useTestDataSource - true if integration test datasource should be used (default)
      Returns:
      builder instance
    • standard

      public static AcrossTestContextBuilder standard()
      Create a new builder for a standard (non-web) AcrossContext. This builder will create a AcrossTestContext.
      Returns:
      builder instance
    • web

      public static AcrossTestWebContextBuilder web(boolean useTestDataSource)
      Create a new builder for a web based AcrossContext. This will ensure a ServletContext is initialized and Spring WebApplicationContext is being used. This builder will create a AcrossTestWebContext with support for MockMvc.
      Parameters:
      useTestDataSource - true if integration test datasource should be used (default)
      Returns:
      builder instance
    • web

      public static AcrossTestWebContextBuilder web()
      Create a new builder for a web based AcrossContext. This will ensure a ServletContext is initialized and Spring WebApplicationContext is being used. This builder will create a AcrossTestWebContext with support for MockMvc.
      Returns:
      builder instance