Package org.springframework.test.context

Examples of org.springframework.test.context.ContextLoader.processLocations()


  public void assertContextConfigurationLocations() throws Exception {

    final ContextConfiguration contextConfig = this.testClass.getAnnotation(ContextConfiguration.class);
    final ContextLoader contextLoader = new GenericXmlContextLoader();
    final String[] configuredLocations = (String[]) AnnotationUtils.getValue(contextConfig, "locations");
    final String[] processedLocations = contextLoader.processLocations(this.testClass, configuredLocations);

    if (logger.isDebugEnabled()) {
      logger.debug("----------------------------------------------------------------------");
      logger.debug("Configured locations: " + ObjectUtils.nullSafeToString(configuredLocations));
      logger.debug("Expected   locations: " + ObjectUtils.nullSafeToString(this.expectedLocations));
View Full Code Here


        smartContextLoader.processContextConfiguration(configAttributes);
        locationsList.addAll(0, Arrays.asList(configAttributes.getLocations()));
        classesList.addAll(0, Arrays.asList(configAttributes.getClasses()));
      }
      else {
        String[] processedLocations = contextLoader.processLocations(configAttributes.getDeclaringClass(),
          configAttributes.getLocations());
        locationsList.addAll(0, Arrays.asList(processedLocations));
        // Legacy ContextLoaders don't know how to process classes
      }
      if (!configAttributes.isInheritLocations()) {
View Full Code Here

  public void assertContextConfigurationLocations() throws Exception {

    final ContextConfiguration contextConfig = this.testClass.getAnnotation(ContextConfiguration.class);
    final ContextLoader contextLoader = new GenericXmlContextLoader();
    final String[] configuredLocations = (String[]) AnnotationUtils.getValue(contextConfig);
    final String[] processedLocations = contextLoader.processLocations(this.testClass, configuredLocations);

    if (logger.isDebugEnabled()) {
      logger.debug("----------------------------------------------------------------------");
      logger.debug("Configured locations: " + ObjectUtils.nullSafeToString(configuredLocations));
      logger.debug("Expected   locations: " + ObjectUtils.nullSafeToString(this.expectedLocations));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.