當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。