use of org.springframework.integration.mail.AbstractMailReceiver in project spring-integration by spring-projects.
the class InboundChannelAdapterParserTests method imapIdleWithAuthenticator.
@Test
public void imapIdleWithAuthenticator() {
AbstractMailReceiver receiver = this.getReceiver("imapIdleWithAuthenticator");
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 imapIdleWithMaxFetchSize.
@Test
public void imapIdleWithMaxFetchSize() {
AbstractMailReceiver receiver = this.getReceiver("imapIdleWithMaxFetchSize");
assertEquals(ImapMailReceiver.class, receiver.getClass());
Object value = new DirectFieldAccessor(receiver).getPropertyValue("maxFetchSize");
assertEquals(33, value);
}
use of org.springframework.integration.mail.AbstractMailReceiver in project spring-integration by spring-projects.
the class InboundChannelAdapterParserTests method pop3WithMaxFetchSize.
// ==================== INT-1160 ====================
@Test
public void pop3WithMaxFetchSize() {
AbstractMailReceiver receiver = this.getReceiver("pop3WithMaxFetchSize");
assertEquals(Pop3MailReceiver.class, receiver.getClass());
Object value = new DirectFieldAccessor(receiver).getPropertyValue("maxFetchSize");
assertEquals(11, value);
}
use of org.springframework.integration.mail.AbstractMailReceiver in project spring-integration by spring-projects.
the class InboundChannelAdapterParserTests method imapWithSession.
@Test
public void imapWithSession() {
AbstractMailReceiver receiver = this.getReceiver("imapWithSession");
assertEquals(ImapMailReceiver.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 pop3ShouldDeleteTrue.
// ==================== INT-982 =====================
@Test
public void pop3ShouldDeleteTrue() {
AbstractMailReceiver receiver = this.getReceiver("pop3ShouldDeleteTrue");
assertEquals(Pop3MailReceiver.class, receiver.getClass());
DirectFieldAccessor receiverAccessor = new DirectFieldAccessor(receiver);
Boolean value = (Boolean) receiverAccessor.getPropertyValue("shouldDeleteMessages");
assertTrue(value);
assertEquals(Boolean.FALSE, receiverAccessor.getPropertyValue("embeddedPartsAsBytes"));
assertNotNull(receiverAccessor.getPropertyValue("headerMapper"));
}
Aggregations