use of org.springframework.context.annotation.AnnotationConfigApplicationContext in project spring-boot by spring-projects.
the class JsonComponentModuleTests method moduleShouldRegisterDeserializers.
@Test
public void moduleShouldRegisterDeserializers() throws Exception {
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(JsonComponentModule.class, OnlyDeserializer.class);
JsonComponentModule module = context.getBean(JsonComponentModule.class);
assertDeserialize(module);
context.close();
}
use of org.springframework.context.annotation.AnnotationConfigApplicationContext in project spring-boot by spring-projects.
the class JsonComponentModuleTests method moduleShouldRegisterInnerClasses.
@Test
public void moduleShouldRegisterInnerClasses() throws Exception {
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(JsonComponentModule.class, NameAndAgeJsonComponent.class);
JsonComponentModule module = context.getBean(JsonComponentModule.class);
assertSerialize(module);
assertDeserialize(module);
context.close();
}
use of org.springframework.context.annotation.AnnotationConfigApplicationContext in project spring-boot by spring-projects.
the class JsonComponentModuleTests method moduleShouldRegisterSerializers.
@Test
public void moduleShouldRegisterSerializers() throws Exception {
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(JsonComponentModule.class, OnlySerializer.class);
JsonComponentModule module = context.getBean(JsonComponentModule.class);
assertSerialize(module);
context.close();
}
use of org.springframework.context.annotation.AnnotationConfigApplicationContext in project spring-boot by spring-projects.
the class AtomikosDependsOnBeanFactoryPostProcessorTests method setsDependsOn.
@Test
public void setsDependsOn() {
this.context = new AnnotationConfigApplicationContext(Config.class);
assertDependsOn("dataSource");
assertDependsOn("connectionFactory");
assertDependsOn("userTransactionManager", "dataSource", "connectionFactory");
assertDependsOn("messageDrivenContainer", "userTransactionManager");
this.context.close();
}
use of org.springframework.context.annotation.AnnotationConfigApplicationContext in project spring-boot by spring-projects.
the class ServletComponentScanRegistrarTests method packagesConfiguredWithValue.
@Test
public void packagesConfiguredWithValue() {
this.context = new AnnotationConfigApplicationContext(ValuePackages.class);
ServletComponentRegisteringPostProcessor postProcessor = this.context.getBean(ServletComponentRegisteringPostProcessor.class);
assertThat(postProcessor.getPackagesToScan()).contains("com.example.foo", "com.example.bar");
}
Aggregations