use of org.springframework.test.context.MergedContextConfiguration in project spring-framework by spring-projects.
the class BootstrapTestUtilsMergedConfigTests method buildMergedConfigWithAnnotationsAndOverriddenClasses.
@Test
public void buildMergedConfigWithAnnotationsAndOverriddenClasses() {
Class<?> testClass = OverriddenClassesBar.class;
Class<?>[] expectedClasses = new Class<?>[] { BarConfig.class };
MergedContextConfiguration mergedConfig = buildMergedContextConfiguration(testClass);
assertMergedConfig(mergedConfig, testClass, EMPTY_STRING_ARRAY, expectedClasses, AnnotationConfigContextLoader.class);
}
use of org.springframework.test.context.MergedContextConfiguration in project spring-framework by spring-projects.
the class AnnotationConfigContextLoaderTests method configMustNotContainLocations.
/**
* @since 4.0.4
*/
@Test
public void configMustNotContainLocations() throws Exception {
expectedException.expect(IllegalStateException.class);
expectedException.expectMessage(containsString("does not support resource locations"));
MergedContextConfiguration mergedConfig = new MergedContextConfiguration(getClass(), new String[] { "config.xml" }, EMPTY_CLASS_ARRAY, EMPTY_STRING_ARRAY, contextLoader);
contextLoader.loadContext(mergedConfig);
}
use of org.springframework.test.context.MergedContextConfiguration in project spring-framework by spring-projects.
the class BootstrapTestUtilsContextInitializerTests method buildMergedConfigWithOverriddenInitializersAndClasses.
@Test
public void buildMergedConfigWithOverriddenInitializersAndClasses() {
Class<?> testClass = OverriddenInitializersAndClassesBar.class;
MergedContextConfiguration mergedConfig = buildMergedContextConfiguration(testClass);
assertMergedConfig(mergedConfig, testClass, EMPTY_STRING_ARRAY, classes(BarConfig.class), initializers(BarInitializer.class), DelegatingSmartContextLoader.class);
}
use of org.springframework.test.context.MergedContextConfiguration in project spring-framework by spring-projects.
the class BootstrapTestUtilsContextInitializerTests method buildMergedConfigWithLocalAndInheritedInitializer.
@Test
public void buildMergedConfigWithLocalAndInheritedInitializer() {
Class<?> testClass = InitializersBar.class;
MergedContextConfiguration mergedConfig = buildMergedContextConfiguration(testClass);
assertMergedConfig(mergedConfig, testClass, EMPTY_STRING_ARRAY, classes(FooConfig.class, BarConfig.class), initializers(FooInitializer.class, BarInitializer.class), DelegatingSmartContextLoader.class);
}
use of org.springframework.test.context.MergedContextConfiguration in project spring-framework by spring-projects.
the class BootstrapTestUtilsContextInitializerTests method buildMergedConfigWithLocalInitializerAndConfigClass.
@Test
public void buildMergedConfigWithLocalInitializerAndConfigClass() {
Class<?> testClass = InitializersFoo.class;
MergedContextConfiguration mergedConfig = buildMergedContextConfiguration(testClass);
assertMergedConfig(mergedConfig, testClass, EMPTY_STRING_ARRAY, classes(FooConfig.class), initializers(FooInitializer.class), DelegatingSmartContextLoader.class);
}
Aggregations