ch.elca.el4j.tests.core.context
Annotation Type ExtendedContextConfiguration


@Documented
@Inherited
@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface ExtendedContextConfiguration

In addition Spring's @ContextConfiguration, provides settings for the ModuleApplicationContext to be created.

WARNING: For the settings to be applied to the ApplicationContext, the contextLoader attribute of the @ContextConfiguration annotation MUST BE A SUBTYPE OF ModuleTestContextLoader.

Typically, you would annotate your test classes as follows:

 @RunWith(EL4JJunit4ClassRunner.class)
 @ExtendedContextConfiguration(exclusiveConfigLocations = {
           "classpath*:mandatory/refdb-core-config.xml",
           "classpath*:mandatory/keyword-core-config.xml" },
     allowBeanDefinitionOverriding = "true")
 @ContextConfiguration(
     locations = {
               "classpath*:mandatory/*.xml",
               "classpath*:scenarios/db/raw/*.xml",
         ...
         },
     loader = ModuleTestContextLoader.class)
 @Transactional
 public abstract class AbstractJpaDaoTest
 
The exclusiveConfigLocations parameter is affected by @ContextConfiguration's inheritLocations attribute, i.e. the paths to be excluded are overridden or merged depending on the value of inheritLocations.

The boolean properties of ModuleApplicationContextConfiguration have to be specified as String values which allows one to only specify the properties whose values vary from the values specified in the superclasses' @ExtendedContextConfiguration specification.

Author:
Simon Stelling (SST)
See Also:
ModuleApplicationContextConfiguration
File-location:
ExtendedContextConfiguration
Last check-in date:
2010-12-21 11:08:04 +0100 (Di, 21. Dez 2010) by swismer for revision 4253

Optional Element Summary
 String allowBeanDefinitionOverriding
          Indicates if bean definition overriding is enabled.
 String[] exclusiveConfigLocations
          Exclusive config locations.
 String mergeWithOuterResources
          Indicates if unordered/unknown resources should be used.
 String mostSpecificBeanDefinitionCounts
          Indicates if the most specific bean definition counts.
 String mostSpecificResourceLast
          Indicates if the most specific resource should be the last resource in the fetched resource array.
 

exclusiveConfigLocations

public abstract String[] exclusiveConfigLocations
Exclusive config locations. The default is an empty string array. Note that the ContextConfiguration.inheritLocations() property affects the behaviour of exclusiveConfigLocations in the same way it affects the ContextConfiguration.locations().

Default:
{}

allowBeanDefinitionOverriding

public abstract String allowBeanDefinitionOverriding
Indicates if bean definition overriding is enabled. Must be "true" or "false".

Default:
""

mergeWithOuterResources

public abstract String mergeWithOuterResources
Indicates if unordered/unknown resources should be used. Must be "true" or "false".

Default:
""

mostSpecificResourceLast

public abstract String mostSpecificResourceLast
Indicates if the most specific resource should be the last resource in the fetched resource array. If its value is set to true and only one resource is requested the least specific resource will be returned. Must be "true" or "false".

Default:
""

mostSpecificBeanDefinitionCounts

public abstract String mostSpecificBeanDefinitionCounts
Indicates if the most specific bean definition counts. Must be "true" or "false".

Default:
""


Copyright © 2005-2011 ELCA. All Rights Reserved.