INT-1471 consolidated Inbound parsers, added initial support for MetadataStore to handle duplicates
This commit is contained in:
@@ -33,13 +33,13 @@
|
||||
consumer-secret="${twitter.oauth.consumerSecret}"/>
|
||||
|
||||
|
||||
<twitter:inbound-mention-channel-adapter twitter-connection="tc" channel="inbound_mentions"/>
|
||||
<service-activator input-channel="inbound_mentions" ref="twitterAnnouncer" method="mention"/>
|
||||
<!-- <twitter:inbound-mention-channel-adapter twitter-connection="tc" channel="inbound_mentions"/>-->
|
||||
<!-- <service-activator input-channel="inbound_mentions" ref="twitterAnnouncer" method="mention"/>-->
|
||||
<!---->
|
||||
<!-- <twitter:inbound-dm-channel-adapter twitter-connection="tc" channel="inbound_dm"/>-->
|
||||
<!-- <service-activator input-channel="inbound_dm" ref="twitterAnnouncer" method="dm"/>-->
|
||||
|
||||
<twitter:inbound-dm-channel-adapter twitter-connection="tc" channel="inbound_dm"/>
|
||||
<service-activator input-channel="inbound_dm" ref="twitterAnnouncer" method="dm"/>
|
||||
|
||||
<twitter:inbound-update-channel-adapter twitter-connection="tc" channel="inbound_updates"/>
|
||||
<twitter:inbound-update-channel-adapter id="twitterInbound" twitter-connection="tc" channel="inbound_updates"/>
|
||||
<service-activator input-channel="inbound_updates" ref="twitterAnnouncer" method="updates"/>
|
||||
|
||||
<beans:bean id="twitterAnnouncer" class="org.springframework.integration.twitter.config.TwitterAnnouncer"/>
|
||||
|
||||
@@ -17,6 +17,7 @@ package org.springframework.integration.twitter.inbound;
|
||||
|
||||
import static junit.framework.Assert.assertEquals;
|
||||
import static junit.framework.Assert.assertNotNull;
|
||||
import static junit.framework.Assert.assertNull;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
@@ -62,11 +63,10 @@ public class InboundDirectMessageStatusEndpointTests {
|
||||
endpoint.start();
|
||||
Message message1 = channel.receive(3000);
|
||||
assertNotNull(message1);
|
||||
System.out.println();
|
||||
// should be second message since its timestamp is newer
|
||||
assertEquals(secondMessage.getId(), ((DirectMessage)message1.getPayload()).getId());
|
||||
Message message2 = channel.receive(3000);
|
||||
assertNotNull(message2);
|
||||
assertEquals(firstMessage.getId(), ((DirectMessage)message2.getPayload()).getId());
|
||||
Message message2 = channel.receive(100);
|
||||
assertNull(message2); // should be null, since
|
||||
}
|
||||
|
||||
@Before
|
||||
|
||||
Reference in New Issue
Block a user