*
* @return created {@link org.springframework.context.ApplicationContext}
*/
private ApplicationContext getApplicationContext(TestClass testClass) {
SpringConfiguration springConfiguration = testClass.getAnnotation(SpringConfiguration.class);
String[] locations = new String[]{SpringInjectConstants.DEFAULT_LOCATION};
if (springConfiguration.value().length > 0) {
locations = springConfiguration.value();
}
Class<? extends ApplicationContext> applicationContextClass = getCustomContextClass();
if (springConfiguration.contextClass() != ApplicationContext.class) {
applicationContextClass = springConfiguration.contextClass();
}
// if the application context class was not specified, then use the default
if (applicationContextClass == null) {
applicationContextClass = ClassPathXmlApplicationContext.class;