use of org.springframework.test.context.MergedContextConfiguration in project spring-framework by spring-projects.
the class GenericPropertiesContextLoaderTests method configMustNotContainAnnotatedClasses.
@Test
public void configMustNotContainAnnotatedClasses() throws Exception {
expectedException.expect(IllegalStateException.class);
expectedException.expectMessage(containsString("does not support annotated classes"));
GenericPropertiesContextLoader loader = new GenericPropertiesContextLoader();
MergedContextConfiguration mergedConfig = new MergedContextConfiguration(getClass(), EMPTY_STRING_ARRAY, new Class<?>[] { getClass() }, EMPTY_STRING_ARRAY, loader);
loader.loadContext(mergedConfig);
}
use of org.springframework.test.context.MergedContextConfiguration in project spring-framework by spring-projects.
the class GenericXmlContextLoaderTests method configMustNotContainAnnotatedClasses.
@Test
public void configMustNotContainAnnotatedClasses() throws Exception {
expectedException.expect(IllegalStateException.class);
expectedException.expectMessage(containsString("does not support annotated classes"));
GenericXmlContextLoader loader = new GenericXmlContextLoader();
MergedContextConfiguration mergedConfig = new MergedContextConfiguration(getClass(), EMPTY_STRING_ARRAY, new Class<?>[] { getClass() }, EMPTY_STRING_ARRAY, loader);
loader.loadContext(mergedConfig);
}
use of org.springframework.test.context.MergedContextConfiguration in project spring-framework by spring-projects.
the class BootstrapTestUtilsContextInitializerTests method buildMergedConfigWithSingleLocalInitializer.
@Test
public void buildMergedConfigWithSingleLocalInitializer() {
Class<?> testClass = SingleInitializer.class;
MergedContextConfiguration mergedConfig = buildMergedContextConfiguration(testClass);
assertMergedConfig(mergedConfig, testClass, EMPTY_STRING_ARRAY, EMPTY_CLASS_ARRAY, initializers(FooInitializer.class), DelegatingSmartContextLoader.class);
}
use of org.springframework.test.context.MergedContextConfiguration in project spring-framework by spring-projects.
the class BootstrapTestUtilsContextInitializerTests method buildMergedConfigWithOverriddenInitializers.
@Test
public void buildMergedConfigWithOverriddenInitializers() {
Class<?> testClass = OverriddenInitializersBar.class;
MergedContextConfiguration mergedConfig = buildMergedContextConfiguration(testClass);
assertMergedConfig(mergedConfig, testClass, EMPTY_STRING_ARRAY, classes(FooConfig.class, BarConfig.class), initializers(BarInitializer.class), DelegatingSmartContextLoader.class);
}
use of org.springframework.test.context.MergedContextConfiguration in project spring-framework by spring-projects.
the class BootstrapTestUtilsMergedConfigTests method buildMergedConfigWithLocalAnnotationAndClasses.
@Test
public void buildMergedConfigWithLocalAnnotationAndClasses() {
Class<?> testClass = ClassesFoo.class;
MergedContextConfiguration mergedConfig = buildMergedContextConfiguration(testClass);
assertMergedConfig(mergedConfig, testClass, EMPTY_STRING_ARRAY, new Class<?>[] { FooConfig.class }, DelegatingSmartContextLoader.class);
}
Aggregations