use of org.springframework.integration.support.SmartLifecycleRoleController in project spring-integration by spring-projects.
the class XPathRouterParserTests method testParse.
@Test
public void testParse() throws Exception {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("XPathRouterTests-context.xml", this.getClass());
EventDrivenConsumer consumer = (EventDrivenConsumer) context.getBean("parseOnly");
assertEquals(2, TestUtils.getPropertyValue(consumer, "handler.order"));
assertEquals(123L, TestUtils.getPropertyValue(consumer, "handler.messagingTemplate.sendTimeout"));
assertEquals(-1, TestUtils.getPropertyValue(consumer, "phase"));
assertFalse(TestUtils.getPropertyValue(consumer, "autoStartup", Boolean.class));
SmartLifecycleRoleController roleController = context.getBean(SmartLifecycleRoleController.class);
@SuppressWarnings("unchecked") List<SmartLifecycle> list = (List<SmartLifecycle>) TestUtils.getPropertyValue(roleController, "lifecycles", MultiValueMap.class).get("foo");
assertThat(list, contains((SmartLifecycle) consumer));
context.close();
}
use of org.springframework.integration.support.SmartLifecycleRoleController in project spring-integration by spring-projects.
the class XsltPayloadTransformerParserTests method testParse.
@Test
public void testParse() throws Exception {
EventDrivenConsumer consumer = (EventDrivenConsumer) applicationContext.getBean("parseOnly");
assertEquals(2, TestUtils.getPropertyValue(consumer, "handler.order"));
assertEquals(123L, TestUtils.getPropertyValue(consumer, "handler.messagingTemplate.sendTimeout"));
assertEquals(-1, TestUtils.getPropertyValue(consumer, "phase"));
assertFalse(TestUtils.getPropertyValue(consumer, "autoStartup", Boolean.class));
SmartLifecycleRoleController roleController = applicationContext.getBean(SmartLifecycleRoleController.class);
@SuppressWarnings("unchecked") List<SmartLifecycle> list = (List<SmartLifecycle>) TestUtils.getPropertyValue(roleController, "lifecycles", MultiValueMap.class).get("foo");
assertThat(list, contains((SmartLifecycle) consumer));
}
use of org.springframework.integration.support.SmartLifecycleRoleController in project spring-integration by spring-projects.
the class XmlPayloadValidatingFilterParserTests method testParse.
@Test
public void testParse() throws Exception {
EventDrivenConsumer consumer = (EventDrivenConsumer) ac.getBean("parseOnly");
assertEquals(2, TestUtils.getPropertyValue(consumer, "handler.order"));
assertEquals(123L, TestUtils.getPropertyValue(consumer, "handler.messagingTemplate.sendTimeout"));
assertEquals(-1, TestUtils.getPropertyValue(consumer, "phase"));
assertFalse(TestUtils.getPropertyValue(consumer, "autoStartup", Boolean.class));
SmartLifecycleRoleController roleController = ac.getBean(SmartLifecycleRoleController.class);
@SuppressWarnings("unchecked") List<SmartLifecycle> list = (List<SmartLifecycle>) TestUtils.getPropertyValue(roleController, "lifecycles", MultiValueMap.class).get("foo");
assertThat(list, contains((SmartLifecycle) consumer));
}
Aggregations