本文整理汇总了Java中org.springframework.test.context.support.AnnotationConfigContextLoader类的典型用法代码示例。如果您正苦于以下问题:Java AnnotationConfigContextLoader类的具体用法?Java AnnotationConfigContextLoader怎么用?Java AnnotationConfigContextLoader使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AnnotationConfigContextLoader类属于org.springframework.test.context.support包,在下文中一共展示了AnnotationConfigContextLoader类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: hashCodeWithEmptyArraysAndDifferentLoaders
import org.springframework.test.context.support.AnnotationConfigContextLoader; //导入依赖的package包/类
@Test
public void hashCodeWithEmptyArraysAndDifferentLoaders() {
MergedContextConfiguration mergedConfig1 = new MergedContextConfiguration(getClass(),
EMPTY_STRING_ARRAY, EMPTY_CLASS_ARRAY, EMPTY_STRING_ARRAY, loader);
MergedContextConfiguration mergedConfig2 = new MergedContextConfiguration(getClass(),
EMPTY_STRING_ARRAY, EMPTY_CLASS_ARRAY, EMPTY_STRING_ARRAY, new AnnotationConfigContextLoader());
assertNotEquals(mergedConfig1.hashCode(), mergedConfig2.hashCode());
}
示例2: equalsWithEmptyArraysAndDifferentLoaders
import org.springframework.test.context.support.AnnotationConfigContextLoader; //导入依赖的package包/类
@Test
public void equalsWithEmptyArraysAndDifferentLoaders() {
MergedContextConfiguration mergedConfig1 = new MergedContextConfiguration(getClass(),
EMPTY_STRING_ARRAY, EMPTY_CLASS_ARRAY, EMPTY_STRING_ARRAY, loader);
MergedContextConfiguration mergedConfig2 = new MergedContextConfiguration(getClass(),
EMPTY_STRING_ARRAY, EMPTY_CLASS_ARRAY, EMPTY_STRING_ARRAY, new AnnotationConfigContextLoader());
assertNotEquals(mergedConfig1, mergedConfig2);
assertNotEquals(mergedConfig2, mergedConfig1);
}
示例3: hashCodeWithEmptyArraysAndDifferentLoaders
import org.springframework.test.context.support.AnnotationConfigContextLoader; //导入依赖的package包/类
@Test
public void hashCodeWithEmptyArraysAndDifferentLoaders() {
MergedContextConfiguration mergedConfig1 = new MergedContextConfiguration(getClass(), EMPTY_STRING_ARRAY,
EMPTY_CLASS_ARRAY, EMPTY_STRING_ARRAY, loader);
MergedContextConfiguration mergedConfig2 = new MergedContextConfiguration(getClass(), EMPTY_STRING_ARRAY,
EMPTY_CLASS_ARRAY, EMPTY_STRING_ARRAY, new AnnotationConfigContextLoader());
assertNotEquals(mergedConfig1.hashCode(), mergedConfig2.hashCode());
}
示例4: equalsWithEmptyArraysAndDifferentLoaders
import org.springframework.test.context.support.AnnotationConfigContextLoader; //导入依赖的package包/类
@Test
public void equalsWithEmptyArraysAndDifferentLoaders() {
MergedContextConfiguration mergedConfig1 = new MergedContextConfiguration(getClass(), EMPTY_STRING_ARRAY,
EMPTY_CLASS_ARRAY, EMPTY_STRING_ARRAY, loader);
MergedContextConfiguration mergedConfig2 = new MergedContextConfiguration(getClass(), EMPTY_STRING_ARRAY,
EMPTY_CLASS_ARRAY, EMPTY_STRING_ARRAY, new AnnotationConfigContextLoader());
assertNotEquals(mergedConfig1, mergedConfig2);
assertNotEquals(mergedConfig2, mergedConfig1);
}
示例5: buildMergedConfigWithLocalAndInheritedAnnotationsAndLocations
import org.springframework.test.context.support.AnnotationConfigContextLoader; //导入依赖的package包/类
@Test
public void buildMergedConfigWithLocalAndInheritedAnnotationsAndLocations() {
Class<?> testClass = LocationsBar.class;
String[] expectedLocations = new String[] { "/foo.xml", "/bar.xml" };
MergedContextConfiguration mergedConfig = buildMergedContextConfiguration(testClass, null, null);
assertMergedConfig(mergedConfig, testClass, expectedLocations, EMPTY_CLASS_ARRAY,
AnnotationConfigContextLoader.class);
}
示例6: buildMergedConfigWithLocalAndInheritedAnnotationsAndClasses
import org.springframework.test.context.support.AnnotationConfigContextLoader; //导入依赖的package包/类
@Test
public void buildMergedConfigWithLocalAndInheritedAnnotationsAndClasses() {
Class<?> testClass = ClassesBar.class;
Class<?>[] expectedClasses = new Class<?>[] { FooConfig.class, BarConfig.class };
MergedContextConfiguration mergedConfig = buildMergedContextConfiguration(testClass, null, null);
assertMergedConfig(mergedConfig, testClass, EMPTY_STRING_ARRAY, expectedClasses,
AnnotationConfigContextLoader.class);
}
示例7: buildMergedConfigWithAnnotationsAndOverriddenLocations
import org.springframework.test.context.support.AnnotationConfigContextLoader; //导入依赖的package包/类
@Test
public void buildMergedConfigWithAnnotationsAndOverriddenLocations() {
Class<?> testClass = OverriddenLocationsBar.class;
String[] expectedLocations = new String[] { "/bar.xml" };
MergedContextConfiguration mergedConfig = buildMergedContextConfiguration(testClass, null, null);
assertMergedConfig(mergedConfig, testClass, expectedLocations, EMPTY_CLASS_ARRAY,
AnnotationConfigContextLoader.class);
}
示例8: buildMergedConfigWithAnnotationsAndOverriddenClasses
import org.springframework.test.context.support.AnnotationConfigContextLoader; //导入依赖的package包/类
@Test
public void buildMergedConfigWithAnnotationsAndOverriddenClasses() {
Class<?> testClass = OverriddenClassesBar.class;
Class<?>[] expectedClasses = new Class<?>[] { BarConfig.class };
MergedContextConfiguration mergedConfig = buildMergedContextConfiguration(testClass, null, null);
assertMergedConfig(mergedConfig, testClass, EMPTY_STRING_ARRAY, expectedClasses,
AnnotationConfigContextLoader.class);
}
示例9: assertLocationsBarAttributes
import org.springframework.test.context.support.AnnotationConfigContextLoader; //导入依赖的package包/类
private void assertLocationsBarAttributes(ContextConfigurationAttributes attributes) {
assertAttributes(attributes, LocationsBar.class, new String[] { "/bar.xml" }, EMPTY_CLASS_ARRAY,
AnnotationConfigContextLoader.class, true);
}
示例10: assertClassesBarAttributes
import org.springframework.test.context.support.AnnotationConfigContextLoader; //导入依赖的package包/类
private void assertClassesBarAttributes(ContextConfigurationAttributes attributes) {
assertAttributes(attributes, ClassesBar.class, EMPTY_STRING_ARRAY, new Class<?>[] { BarConfig.class },
AnnotationConfigContextLoader.class, true);
}