Search in sources :

Example 1 with AbstractXmppConnectionAwareMessageHandler

use of org.springframework.integration.xmpp.core.AbstractXmppConnectionAwareMessageHandler in project spring-integration by spring-projects.

the class PresenceOutboundChannelAdapterParserTests method testRosterEventOutboundChannelAdapterParserAsPollingConsumer.

@Test
public void testRosterEventOutboundChannelAdapterParserAsPollingConsumer() {
    Object pollingConsumer = context.getBean("pollingOutboundRosterAdapter");
    assertTrue(pollingConsumer instanceof PollingConsumer);
    AbstractXmppConnectionAwareMessageHandler handler = (AbstractXmppConnectionAwareMessageHandler) TestUtils.getPropertyValue(pollingConsumer, "handler");
    assertEquals(23, TestUtils.getPropertyValue(handler, "order"));
}
Also used : PollingConsumer(org.springframework.integration.endpoint.PollingConsumer) AbstractXmppConnectionAwareMessageHandler(org.springframework.integration.xmpp.core.AbstractXmppConnectionAwareMessageHandler) Test(org.junit.Test)

Example 2 with AbstractXmppConnectionAwareMessageHandler

use of org.springframework.integration.xmpp.core.AbstractXmppConnectionAwareMessageHandler in project spring-integration by spring-projects.

the class PresenceOutboundChannelAdapterParserTests method testRosterEventOutboundChannelAdapterParserEventConsumer.

@Test
public void testRosterEventOutboundChannelAdapterParserEventConsumer() {
    Object eventConsumer = context.getBean("eventOutboundRosterAdapter");
    assertTrue(eventConsumer instanceof EventDrivenConsumer);
    AbstractXmppConnectionAwareMessageHandler handler = (AbstractXmppConnectionAwareMessageHandler) TestUtils.getPropertyValue(eventConsumer, "handler");
    assertEquals(34, TestUtils.getPropertyValue(handler, "order"));
}
Also used : EventDrivenConsumer(org.springframework.integration.endpoint.EventDrivenConsumer) AbstractXmppConnectionAwareMessageHandler(org.springframework.integration.xmpp.core.AbstractXmppConnectionAwareMessageHandler) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 AbstractXmppConnectionAwareMessageHandler (org.springframework.integration.xmpp.core.AbstractXmppConnectionAwareMessageHandler)2 EventDrivenConsumer (org.springframework.integration.endpoint.EventDrivenConsumer)1 PollingConsumer (org.springframework.integration.endpoint.PollingConsumer)1