Class SpringCustomContextLoader

java.lang.Object
de.hybris.platform.basecommerce.util.SpringCustomContextLoader

public class SpringCustomContextLoader extends Object
based on TestContext
  • Constructor Details

    • SpringCustomContextLoader

      public SpringCustomContextLoader(Class testClazz)
  • Method Details

    • loadApplicationContexts

      public void loadApplicationContexts(org.springframework.context.support.GenericApplicationContext globalCtx) throws Exception
      Throws:
      Exception
    • loadApplicationContextByConvention

      public void loadApplicationContextByConvention(org.springframework.context.support.GenericApplicationContext globalCtx)
    • retrieveContextLocations

      protected String[] retrieveContextLocations(org.springframework.test.context.ContextLoader contextLoader, Class<?> clazz)
      Retrieve ApplicationContext resource locations for the supplied class, using the supplied ContextLoader to process the locations.

      Note that the inheritLocations flag of @ContextConfiguration will be taken into consideration. Specifically, if the inheritLocations flag is set to true, locations defined in the annotated class will be appended to the locations defined in superclasses.

      Parameters:
      contextLoader - the ContextLoader to use for processing the locations (must not be null)
      clazz - the class for which to retrieve the resource locations (must not be null)
      Returns:
      the list of ApplicationContext resource locations for the specified class, including locations from superclasses if appropriate
      Throws:
      IllegalArgumentException - if @ContextConfiguration is not present on the supplied class