Search in sources :

Example 1 with TestTrigger

use of org.springframework.integration.config.TestTrigger in project spring-integration by spring-projects.

the class PollerParserTests method pollerWithTriggerReference.

@Test
public void pollerWithTriggerReference() {
    ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("pollerWithTriggerReference.xml", PollerParserTests.class);
    Object poller = context.getBean("poller");
    assertNotNull(poller);
    PollerMetadata metadata = (PollerMetadata) poller;
    assertTrue(metadata.getTrigger() instanceof TestTrigger);
    context.close();
}
Also used : TestTrigger(org.springframework.integration.config.TestTrigger) ClassPathXmlApplicationContext(org.springframework.context.support.ClassPathXmlApplicationContext) PollerMetadata(org.springframework.integration.scheduling.PollerMetadata) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 ClassPathXmlApplicationContext (org.springframework.context.support.ClassPathXmlApplicationContext)1 TestTrigger (org.springframework.integration.config.TestTrigger)1 PollerMetadata (org.springframework.integration.scheduling.PollerMetadata)1