@@ -141,11 +141,10 @@ public class TestContext extends AttributeAccessorSupport {
141
141
* <li>If a <code>loader</code> class is not specified, the class hierarchy
142
142
* will be traversed to find a parent class annotated with
143
143
* <code>@ContextConfiguration</code>; go to step #1.</li>
144
+ * <li>If no explicit <code>loader</code> class is found after traversing
145
+ * the class hierarchy, an attempt will be made to load and return the class
146
+ * with the supplied <code>defaultContextLoaderClassName</code>.</li>
144
147
* </ol>
145
- * <p>
146
- * If no explicit <code>loader</code> class is found after traversing the
147
- * class hierarchy, an attempt will be made to load and return the class
148
- * with the supplied <code>defaultContextLoaderClassName</code>.
149
148
*
150
149
* @param clazz the class for which to retrieve <code>ContextLoader</code>
151
150
* class; must not be <code>null</code>
@@ -270,16 +269,16 @@ else if (!ObjectUtils.isEmpty(valueLocations)) {
270
269
}
271
270
272
271
/**
273
- * Build an ApplicationContext for this test context using the configured
274
- * ContextLoader and resource locations.
272
+ * Load an <code> ApplicationContext</code> for this test context using the
273
+ * configured <code> ContextLoader</code> and resource locations.
275
274
*
276
- * @throws Exception if an error occurs while building the application
275
+ * @throws Exception if an error occurs while loading the application
277
276
* context
278
277
*/
279
278
private ApplicationContext loadApplicationContext () throws Exception {
280
- Assert .notNull (this .contextLoader , "Can not build an ApplicationContext with a NULL 'contextLoader'. "
279
+ Assert .notNull (this .contextLoader , "Can not load an ApplicationContext with a NULL 'contextLoader'. "
281
280
+ "Consider annotating your test class with @ContextConfiguration." );
282
- Assert .notNull (this .locations , "Can not build an ApplicationContext with a NULL 'locations' array. "
281
+ Assert .notNull (this .locations , "Can not load an ApplicationContext with a NULL 'locations' array. "
283
282
+ "Consider annotating your test class with @ContextConfiguration." );
284
283
return this .contextLoader .loadContext (this .locations );
285
284
}
@@ -296,8 +295,7 @@ private String contextKeyString(Serializable key) {
296
295
* Get the {@link ApplicationContext application context} for this test
297
296
* context, possibly cached.
298
297
*
299
- * @return the application context; may be <code>null</code> if the current
300
- * test context is not configured to use an application context
298
+ * @return the application context
301
299
* @throws IllegalStateException if an error occurs while retrieving the
302
300
* application context
303
301
*/
0 commit comments