本文整理匯總了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);
}