@ -45,22 +45,22 @@ public class ContextLoaderUtilsConfigurationAttributesTests extends AbstractCont
@@ -45,22 +45,22 @@ public class ContextLoaderUtilsConfigurationAttributesTests extends AbstractCont
private void assertLocationsFooAttributes ( ContextConfigurationAttributes attributes ) {
assertAttributes ( attributes , LocationsFoo . class , new String [ ] { "/foo.xml" } , EMPTY_CLASS_ARRAY ,
ContextLoader . class , false ) ;
ContextLoader . class , false ) ;
}
private void assertClassesFooAttributes ( ContextConfigurationAttributes attributes ) {
assertAttributes ( attributes , ClassesFoo . class , EMPTY_STRING_ARRAY , new Class < ? > [ ] { FooConfig . class } ,
ContextLoader . class , false ) ;
assertAttributes ( attributes , ClassesFoo . class , EMPTY_STRING_ARRAY , new Class < ? > [ ] { FooConfig . class } ,
ContextLoader . class , false ) ;
}
private void assertLocationsBarAttributes ( ContextConfigurationAttributes attributes ) {
assertAttributes ( attributes , LocationsBar . class , new String [ ] { "/bar.xml" } , EMPTY_CLASS_ARRAY ,
AnnotationConfigContextLoader . class , true ) ;
assertAttributes ( attributes , LocationsBar . class , new String [ ] { "/bar.xml" } , EMPTY_CLASS_ARRAY ,
AnnotationConfigContextLoader . class , true ) ;
}
private void assertClassesBarAttributes ( ContextConfigurationAttributes attributes ) {
assertAttributes ( attributes , ClassesBar . class , EMPTY_STRING_ARRAY , new Class < ? > [ ] { BarConfig . class } ,
AnnotationConfigContextLoader . class , true ) ;
assertAttributes ( attributes , ClassesBar . class , EMPTY_STRING_ARRAY , new Class < ? > [ ] { BarConfig . class } ,
AnnotationConfigContextLoader . class , true ) ;
}
@Test
@ -68,12 +68,12 @@ public class ContextLoaderUtilsConfigurationAttributesTests extends AbstractCont
@@ -68,12 +68,12 @@ public class ContextLoaderUtilsConfigurationAttributesTests extends AbstractCont
exception . expect ( AnnotationConfigurationException . class ) ;
exception . expectMessage ( containsString ( ConflictingLocations . class . getName ( ) ) ) ;
exception . expectMessage ( either (
containsString ( "attribute [value] and its alias [locations] " ) ) . or (
containsString ( "attribute [locations] and its alias [value] " ) ) ) ;
containsString ( "attribute 'value' and its alias 'locations' " ) ) . or (
containsString ( "attribute 'locations' and its alias 'value' " ) ) ) ;
exception . expectMessage ( either (
containsString ( "values of [{x}] and [{y}]" ) ) . or (
containsString ( "values of [{y}] and [{x}]" ) ) ) ;
exception . expectMessage ( containsString ( "but only one declaration is permitted" ) ) ;
exception . expectMessage ( containsString ( "but only one is permitted" ) ) ;
resolveContextConfigurationAttributes ( ConflictingLocations . class ) ;
}
@ -83,8 +83,8 @@ public class ContextLoaderUtilsConfigurationAttributesTests extends AbstractCont
@@ -83,8 +83,8 @@ public class ContextLoaderUtilsConfigurationAttributesTests extends AbstractCont
List < ContextConfigurationAttributes > attributesList = resolveContextConfigurationAttributes ( testClass ) ;
assertNotNull ( attributesList ) ;
assertEquals ( 1 , attributesList . size ( ) ) ;
assertAttributes ( attributesList . get ( 0 ) , testClass , EMPTY_STRING_ARRAY , EMPTY_CLASS_ARRAY , ContextLoader . class ,
true ) ;
assertAttributes ( attributesList . get ( 0 ) ,
testClass , EMPTY_STRING_ARRAY , EMPTY_CLASS_ARRAY , ContextLoader . class , true ) ;
}
@Test
@ -101,8 +101,8 @@ public class ContextLoaderUtilsConfigurationAttributesTests extends AbstractCont
@@ -101,8 +101,8 @@ public class ContextLoaderUtilsConfigurationAttributesTests extends AbstractCont
List < ContextConfigurationAttributes > attributesList = resolveContextConfigurationAttributes ( testClass ) ;
assertNotNull ( attributesList ) ;
assertEquals ( 1 , attributesList . size ( ) ) ;
assertAttributes ( attributesList . get ( 0 ) , testClass , new String [ ] { "/foo.xml" } , EMPTY_CLASS_ARRAY ,
ContextLoader . class , true ) ;
assertAttributes ( attributesList . get ( 0 ) ,
testClass , new String [ ] { "/foo.xml" } , EMPTY_CLASS_ARRAY , ContextLoader . class , true ) ;
}
@Test
@ -111,8 +111,8 @@ public class ContextLoaderUtilsConfigurationAttributesTests extends AbstractCont
@@ -111,8 +111,8 @@ public class ContextLoaderUtilsConfigurationAttributesTests extends AbstractCont
List < ContextConfigurationAttributes > attributesList = resolveContextConfigurationAttributes ( testClass ) ;
assertNotNull ( attributesList ) ;
assertEquals ( 1 , attributesList . size ( ) ) ;
assertAttributes ( attributesList . get ( 0 ) , testClass , new String [ ] { "/foo.xml" } , EMPTY_CLASS_ARRAY ,
ContextLoader . class , true ) ;
assertAttributes ( attributesList . get ( 0 ) ,
testClass , new String [ ] { "/foo.xml" } , EMPTY_CLASS_ARRAY , ContextLoader . class , true ) ;
}
@Test
@ -121,8 +121,8 @@ public class ContextLoaderUtilsConfigurationAttributesTests extends AbstractCont
@@ -121,8 +121,8 @@ public class ContextLoaderUtilsConfigurationAttributesTests extends AbstractCont
List < ContextConfigurationAttributes > attributesList = resolveContextConfigurationAttributes ( testClass ) ;
assertNotNull ( attributesList ) ;
assertEquals ( 1 , attributesList . size ( ) ) ;
assertAttributes ( attributesList . get ( 0 ) , testClass , new String [ ] { "foo1.xml" , "foo2.xml" } , EMPTY_CLASS_ARRAY ,
ContextLoader . class , true ) ;
assertAttributes ( attributesList . get ( 0 ) ,
testClass , new String [ ] { "foo1.xml" , "foo2.xml" } , EMPTY_CLASS_ARRAY , ContextLoader . class , true ) ;
}
@Test
@ -131,10 +131,10 @@ public class ContextLoaderUtilsConfigurationAttributesTests extends AbstractCont
@@ -131,10 +131,10 @@ public class ContextLoaderUtilsConfigurationAttributesTests extends AbstractCont
List < ContextConfigurationAttributes > attributesList = resolveContextConfigurationAttributes ( testClass ) ;
assertNotNull ( attributesList ) ;
assertEquals ( 2 , attributesList . size ( ) ) ;
assertAttributes ( attributesList . get ( 0 ) , testClass , new String [ ] { "/bar.xml" } , EMPTY_CLASS_ARRAY ,
ContextLoader . class , true ) ;
assertAttributes ( attributesList . get ( 1 ) , MetaLocationsFoo . class , new String [ ] { "/foo.xml" } ,
EMPTY_CLASS_ARRAY , ContextLoader . class , true ) ;
assertAttributes ( attributesList . get ( 0 ) ,
testClass , new String [ ] { "/bar.xml" } , EMPTY_CLASS_ARRAY , ContextLoader . class , true ) ;
assertAttributes ( attributesList . get ( 1 ) ,
MetaLocationsFoo . class , new String [ ] { "/foo.xml" } , EMPTY_CLASS_ARRAY , ContextLoader . class , true ) ;
}
@Test