当前位置: 首页>>代码示例>>Java>>正文


Java AnnotationConfigContextLoader类代码示例

本文整理汇总了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());
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:9,代码来源:MergedContextConfigurationTests.java

示例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);
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:10,代码来源:MergedContextConfigurationTests.java

示例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());
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:9,代码来源:MergedContextConfigurationTests.java

示例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);
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:10,代码来源:MergedContextConfigurationTests.java

示例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);
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:10,代码来源:ContextLoaderUtilsTests.java

示例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);
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:10,代码来源:ContextLoaderUtilsTests.java

示例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);
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:10,代码来源:ContextLoaderUtilsTests.java

示例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);
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:10,代码来源:ContextLoaderUtilsTests.java

示例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);
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:5,代码来源:ContextLoaderUtilsTests.java

示例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);
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:5,代码来源:ContextLoaderUtilsTests.java


注:本文中的org.springframework.test.context.support.AnnotationConfigContextLoader类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。