@@ -45,35 +45,35 @@ public class ContextLoaderUtilsConfigurationAttributesTests extends AbstractCont
45
45
46
46
private void assertLocationsFooAttributes (ContextConfigurationAttributes attributes ) {
47
47
assertAttributes (attributes , LocationsFoo .class , new String [] { "/foo.xml" }, EMPTY_CLASS_ARRAY ,
48
- ContextLoader .class , false );
48
+ ContextLoader .class , false );
49
49
}
50
50
51
51
private void assertClassesFooAttributes (ContextConfigurationAttributes attributes ) {
52
- assertAttributes (attributes , ClassesFoo .class , EMPTY_STRING_ARRAY , new Class <?>[] { FooConfig .class },
53
- ContextLoader .class , false );
52
+ assertAttributes (attributes , ClassesFoo .class , EMPTY_STRING_ARRAY , new Class <?>[] {FooConfig .class },
53
+ ContextLoader .class , false );
54
54
}
55
55
56
56
private void assertLocationsBarAttributes (ContextConfigurationAttributes attributes ) {
57
- assertAttributes (attributes , LocationsBar .class , new String [] { "/bar.xml" }, EMPTY_CLASS_ARRAY ,
58
- AnnotationConfigContextLoader .class , true );
57
+ assertAttributes (attributes , LocationsBar .class , new String [] {"/bar.xml" }, EMPTY_CLASS_ARRAY ,
58
+ AnnotationConfigContextLoader .class , true );
59
59
}
60
60
61
61
private void assertClassesBarAttributes (ContextConfigurationAttributes attributes ) {
62
- assertAttributes (attributes , ClassesBar .class , EMPTY_STRING_ARRAY , new Class <?>[] { BarConfig .class },
63
- AnnotationConfigContextLoader .class , true );
62
+ assertAttributes (attributes , ClassesBar .class , EMPTY_STRING_ARRAY , new Class <?>[] {BarConfig .class },
63
+ AnnotationConfigContextLoader .class , true );
64
64
}
65
65
66
66
@ Test
67
67
public void resolveConfigAttributesWithConflictingLocations () {
68
68
exception .expect (AnnotationConfigurationException .class );
69
69
exception .expectMessage (containsString (ConflictingLocations .class .getName ()));
70
70
exception .expectMessage (either (
71
- containsString ("attribute [ value] and its alias [ locations] " )).or (
72
- containsString ("attribute [ locations] and its alias [ value] " )));
71
+ containsString ("attribute ' value' and its alias ' locations' " )).or (
72
+ containsString ("attribute ' locations' and its alias ' value' " )));
73
73
exception .expectMessage (either (
74
74
containsString ("values of [{x}] and [{y}]" )).or (
75
75
containsString ("values of [{y}] and [{x}]" )));
76
- exception .expectMessage (containsString ("but only one declaration is permitted" ));
76
+ exception .expectMessage (containsString ("but only one is permitted" ));
77
77
resolveContextConfigurationAttributes (ConflictingLocations .class );
78
78
}
79
79
@@ -83,8 +83,8 @@ public void resolveConfigAttributesWithBareAnnotations() {
83
83
List <ContextConfigurationAttributes > attributesList = resolveContextConfigurationAttributes (testClass );
84
84
assertNotNull (attributesList );
85
85
assertEquals (1 , attributesList .size ());
86
- assertAttributes (attributesList .get (0 ), testClass , EMPTY_STRING_ARRAY , EMPTY_CLASS_ARRAY , ContextLoader . class ,
87
- true );
86
+ assertAttributes (attributesList .get (0 ),
87
+ testClass , EMPTY_STRING_ARRAY , EMPTY_CLASS_ARRAY , ContextLoader . class , true );
88
88
}
89
89
90
90
@ Test
@@ -101,8 +101,8 @@ public void resolveConfigAttributesWithMetaAnnotationAndLocations() {
101
101
List <ContextConfigurationAttributes > attributesList = resolveContextConfigurationAttributes (testClass );
102
102
assertNotNull (attributesList );
103
103
assertEquals (1 , attributesList .size ());
104
- assertAttributes (attributesList .get (0 ), testClass , new String [] { "/foo.xml" }, EMPTY_CLASS_ARRAY ,
105
- ContextLoader .class , true );
104
+ assertAttributes (attributesList .get (0 ),
105
+ testClass , new String [] { "/foo.xml" }, EMPTY_CLASS_ARRAY , ContextLoader .class , true );
106
106
}
107
107
108
108
@ Test
@@ -111,8 +111,8 @@ public void resolveConfigAttributesWithMetaAnnotationAndLocationsAndOverrides()
111
111
List <ContextConfigurationAttributes > attributesList = resolveContextConfigurationAttributes (testClass );
112
112
assertNotNull (attributesList );
113
113
assertEquals (1 , attributesList .size ());
114
- assertAttributes (attributesList .get (0 ), testClass , new String [] { "/foo.xml" }, EMPTY_CLASS_ARRAY ,
115
- ContextLoader .class , true );
114
+ assertAttributes (attributesList .get (0 ),
115
+ testClass , new String [] { "/foo.xml" }, EMPTY_CLASS_ARRAY , ContextLoader .class , true );
116
116
}
117
117
118
118
@ Test
@@ -121,8 +121,8 @@ public void resolveConfigAttributesWithMetaAnnotationAndLocationsAndOverriddenAt
121
121
List <ContextConfigurationAttributes > attributesList = resolveContextConfigurationAttributes (testClass );
122
122
assertNotNull (attributesList );
123
123
assertEquals (1 , attributesList .size ());
124
- assertAttributes (attributesList .get (0 ), testClass , new String [] { "foo1.xml" , "foo2.xml" }, EMPTY_CLASS_ARRAY ,
125
- ContextLoader .class , true );
124
+ assertAttributes (attributesList .get (0 ),
125
+ testClass , new String [] { "foo1.xml" , "foo2.xml" }, EMPTY_CLASS_ARRAY , ContextLoader .class , true );
126
126
}
127
127
128
128
@ Test
@@ -131,10 +131,10 @@ public void resolveConfigAttributesWithMetaAnnotationAndLocationsInClassHierarch
131
131
List <ContextConfigurationAttributes > attributesList = resolveContextConfigurationAttributes (testClass );
132
132
assertNotNull (attributesList );
133
133
assertEquals (2 , attributesList .size ());
134
- assertAttributes (attributesList .get (0 ), testClass , new String [] { "/bar.xml" }, EMPTY_CLASS_ARRAY ,
135
- ContextLoader .class , true );
136
- assertAttributes (attributesList .get (1 ), MetaLocationsFoo . class , new String [] { "/foo.xml" },
137
- EMPTY_CLASS_ARRAY , ContextLoader .class , true );
134
+ assertAttributes (attributesList .get (0 ),
135
+ testClass , new String [] { "/bar.xml" }, EMPTY_CLASS_ARRAY , ContextLoader .class , true );
136
+ assertAttributes (attributesList .get (1 ),
137
+ MetaLocationsFoo . class , new String [] { "/foo.xml" }, EMPTY_CLASS_ARRAY , ContextLoader .class , true );
138
138
}
139
139
140
140
@ Test
0 commit comments