-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Closed
Labels
in: testIssues in the test moduleIssues in the test modulestatus: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancementA general enhancement
Description
Magnus Heino opened SPR-7937 and commented
Maybe it's available already? I don't see anything about it though. This seems to work for me...
public class AnnotationConfigApplicationContextLoader implements ContextLoader {
@Override
public String[] processLocations(final Class<?> clazz, final String... locations) {
return locations;
}
@Override
public ApplicationContext loadContext(final String... locations) throws Exception {
return new AnnotationConfigApplicationContext(locations);
}
}
and then...
@ContextConfiguration(locations="se.lantmateriet.dominium", loader=AnnotationConfigApplicationContextLoader.class)
public class MyTests { ... }
Issue Links:
- Provide TestContext support for @Configuration classes [SPR-6184] #10852 Provide TestContext support for
@Configuration
classes
Metadata
Metadata
Assignees
Labels
in: testIssues in the test moduleIssues in the test modulestatus: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancementA general enhancement