use of org.springframework.integration.mail.AbstractMailReceiver in project spring-integration by spring-projects.
the class InboundChannelAdapterParserTests method pop3WithSession.
// ==================== INT-1161 ====================
@Test
public void pop3WithSession() {
AbstractMailReceiver receiver = this.getReceiver("pop3WithSession");
assertEquals(Pop3MailReceiver.class, receiver.getClass());
Object session = new DirectFieldAccessor(receiver).getPropertyValue("session");
assertNotNull(session);
assertEquals(context.getBean("testSession"), session);
}
use of org.springframework.integration.mail.AbstractMailReceiver in project spring-integration by spring-projects.
the class InboundChannelAdapterParserTests method pop3WithMaxFetchSizeFallsBackToPollerMax.
@Test
public void pop3WithMaxFetchSizeFallsBackToPollerMax() {
AbstractMailReceiver receiver = this.getReceiver("pop3WithMaxFetchSizeFallsBackToPollerMax");
assertEquals(Pop3MailReceiver.class, receiver.getClass());
Object value = new DirectFieldAccessor(receiver).getPropertyValue("maxFetchSize");
assertEquals(99, value);
}
use of org.springframework.integration.mail.AbstractMailReceiver in project spring-integration by spring-projects.
the class InboundChannelAdapterParserTests method imapWithAuthenticator.
@Test
public void imapWithAuthenticator() {
AbstractMailReceiver receiver = this.getReceiver("imapWithAuthenticator");
assertEquals(ImapMailReceiver.class, receiver.getClass());
Object authenticator = new DirectFieldAccessor(receiver).getPropertyValue("javaMailAuthenticator");
assertNotNull(authenticator);
assertEquals(context.getBean("testAuthenticator"), authenticator);
}
use of org.springframework.integration.mail.AbstractMailReceiver in project spring-integration by spring-projects.
the class InboundChannelAdapterParserTests method imapWithoutStoreUri.
@Test
public void imapWithoutStoreUri() {
AbstractMailReceiver receiver = this.getReceiver("imapWithoutStoreUri");
assertEquals(ImapMailReceiver.class, receiver.getClass());
Object url = new DirectFieldAccessor(receiver).getPropertyValue("url");
assertNull(url);
}
use of org.springframework.integration.mail.AbstractMailReceiver in project spring-integration by spring-projects.
the class InboundChannelAdapterParserTests method imapWithSearchTermStrategy.
// ==================== INT-2800 ====================
@Test
public void imapWithSearchTermStrategy() {
AbstractMailReceiver receiver = this.getReceiver("imapWithSearch");
assertEquals(ImapMailReceiver.class, receiver.getClass());
DirectFieldAccessor receiverAccessor = new DirectFieldAccessor(receiver);
Object sts = receiverAccessor.getPropertyValue("searchTermStrategy");
assertNotNull(sts);
assertSame(context.getBean(SearchTermStrategy.class), sts);
assertEquals("flagged", receiverAccessor.getPropertyValue("userFlag"));
}
Aggregations