use of org.springframework.context.annotation.AnnotationConfigApplicationContext in project spring-security by spring-projects.
the class TestConfiguration method beanNamesAreCorrectlyResolved.
@Test
public void beanNamesAreCorrectlyResolved() throws Exception {
handler.setApplicationContext(new AnnotationConfigApplicationContext(TestConfiguration.class));
Expression expression = handler.getExpressionParser().parseExpression("@number10.compareTo(@number20) < 0");
assertThat(expression.getValue(handler.createEvaluationContext(mock(Authentication.class), new Object()))).isEqualTo(true);
}
use of org.springframework.context.annotation.AnnotationConfigApplicationContext in project spring-security by spring-projects.
the class WithSecurityContextTestExcecutionListenerTests method setup.
@Before
public void setup() {
listener = new WithSecurityContextTestExecutionListener();
context = new AnnotationConfigApplicationContext(Config.class);
}
use of org.springframework.context.annotation.AnnotationConfigApplicationContext in project spring-security by spring-projects.
the class CsrfConfigurerNoWebMvcTests method loadContext.
private void loadContext(Class<?> configs) {
AnnotationConfigApplicationContext annotationConfigApplicationContext = new AnnotationConfigApplicationContext();
annotationConfigApplicationContext.register(configs);
annotationConfigApplicationContext.refresh();
this.context = annotationConfigApplicationContext;
}
use of org.springframework.context.annotation.AnnotationConfigApplicationContext in project camel by apache.
the class SpringLdapComponentTest method createApplicationContext.
@Override
protected AbstractApplicationContext createApplicationContext() {
AnnotationConfigApplicationContext springContext = new AnnotationConfigApplicationContext();
springContext.register(SpringLdapTestConfiguration.class);
springContext.refresh();
return springContext;
}
use of org.springframework.context.annotation.AnnotationConfigApplicationContext in project spring-framework by spring-projects.
the class EnableCachingIntegrationTests method fooServiceWithInterface.
@Test
public void fooServiceWithInterface() {
this.context = new AnnotationConfigApplicationContext(FooConfig.class);
FooService service = this.context.getBean(FooService.class);
fooGetSimple(service);
}
Aggregations