Search in sources :

Example 1 with ContextCustomizerFactory

use of org.springframework.test.context.ContextCustomizerFactory in project spring-framework by spring-projects.

the class AbstractTestContextBootstrapper method getContextCustomizers.

private Set<ContextCustomizer> getContextCustomizers(Class<?> testClass, List<ContextConfigurationAttributes> configAttributes) {
    List<ContextCustomizerFactory> factories = getContextCustomizerFactories();
    Set<ContextCustomizer> customizers = new LinkedHashSet<>(factories.size());
    for (ContextCustomizerFactory factory : factories) {
        ContextCustomizer customizer = factory.createContextCustomizer(testClass, configAttributes);
        if (customizer != null) {
            customizers.add(customizer);
        }
    }
    return customizers;
}
Also used : LinkedHashSet(java.util.LinkedHashSet) ContextCustomizerFactory(org.springframework.test.context.ContextCustomizerFactory) ContextCustomizer(org.springframework.test.context.ContextCustomizer)

Aggregations

LinkedHashSet (java.util.LinkedHashSet)1 ContextCustomizer (org.springframework.test.context.ContextCustomizer)1 ContextCustomizerFactory (org.springframework.test.context.ContextCustomizerFactory)1