From 7519200d43e22a819d291bbca73f69dd3a6659f5 Mon Sep 17 00:00:00 2001 From: Oleg Zhurakousky Date: Wed, 22 Dec 2010 15:46:43 -0500 Subject: [PATCH] INT-1712 added more assertioins to the test --- .../config/MailOutboundChannelAdapterParserTests.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spring-integration-mail/src/test/java/org/springframework/integration/mail/config/MailOutboundChannelAdapterParserTests.java b/spring-integration-mail/src/test/java/org/springframework/integration/mail/config/MailOutboundChannelAdapterParserTests.java index 9c9ffef1e3..49aeff24fd 100644 --- a/spring-integration-mail/src/test/java/org/springframework/integration/mail/config/MailOutboundChannelAdapterParserTests.java +++ b/spring-integration-mail/src/test/java/org/springframework/integration/mail/config/MailOutboundChannelAdapterParserTests.java @@ -16,14 +16,18 @@ package org.springframework.integration.mail.config; +import static junit.framework.Assert.assertEquals; import static org.junit.Assert.assertNotNull; +import java.util.Properties; + import org.junit.Test; import org.springframework.beans.DirectFieldAccessor; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.integration.mail.MailSendingMessageHandler; +import org.springframework.integration.test.util.TestUtils; import org.springframework.mail.MailSender; /** @@ -65,6 +69,10 @@ public class MailOutboundChannelAdapterParserTests { DirectFieldAccessor fieldAccessor = new DirectFieldAccessor(handler); MailSender mailSender = (MailSender) fieldAccessor.getPropertyValue("mailSender"); assertNotNull(mailSender); + Properties javaMailiProperties = (Properties) TestUtils.getPropertyValue(mailSender, "javaMailProperties"); + assertEquals(7, javaMailiProperties.size()); + assertNotNull(javaMailiProperties); + assertEquals("true", javaMailiProperties.get("mail.smtps.auth")); } }