Class SpringCustomContextLoader


  • public class SpringCustomContextLoader
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void loadApplicationContexts​(org.springframework.context.support.GenericApplicationContext globalCtx)  
      protected java.lang.String[] retrieveContextLocations​(org.springframework.test.context.ContextLoader contextLoader, java.lang.Class<?> clazz)
      Retrieve ApplicationContext resource locations for the supplied class, using the supplied ContextLoader to process the locations.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SpringCustomContextLoader

        public SpringCustomContextLoader​(java.lang.Class testClazz)
    • Method Detail

      • loadApplicationContexts

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

        protected java.lang.String[] retrieveContextLocations​(org.springframework.test.context.ContextLoader contextLoader,
                                                              java.lang.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:
        java.lang.IllegalArgumentException - if @ContextConfiguration is not present on the supplied class