Search in sources :

Example 1 with AnnotationConfigContextLoader

use of org.springframework.test.context.support.AnnotationConfigContextLoader in project spring-framework by spring-projects.

the class MergedContextConfigurationTests method hashCodeWithEmptyArraysAndDifferentLoaders.

@Test
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());
    assertThat(mergedConfig2.hashCode()).isNotEqualTo(mergedConfig1.hashCode());
}
Also used : AnnotationConfigContextLoader(org.springframework.test.context.support.AnnotationConfigContextLoader) Test(org.junit.jupiter.api.Test)

Example 2 with AnnotationConfigContextLoader

use of org.springframework.test.context.support.AnnotationConfigContextLoader in project spring-framework by spring-projects.

the class MergedContextConfigurationTests method equalsWithEmptyArraysAndDifferentLoaders.

@Test
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());
    assertThat(mergedConfig2).isNotEqualTo(mergedConfig1);
    assertThat(mergedConfig1).isNotEqualTo(mergedConfig2);
}
Also used : AnnotationConfigContextLoader(org.springframework.test.context.support.AnnotationConfigContextLoader) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)2 AnnotationConfigContextLoader (org.springframework.test.context.support.AnnotationConfigContextLoader)2