View Javadoc

1   /*
2    * $Id: SmtpFunctionalTestCase.java 22541 2011-07-22 20:07:49Z evangelinamrm $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.transport.email.functional;
12  
13  import java.util.Arrays;
14  import java.util.Collection;
15  import javax.mail.internet.MimeMessage;
16  
17  import org.junit.Test;
18  import org.junit.runners.Parameterized.Parameters;
19  import static org.junit.Assert.assertEquals;
20  
21  public class SmtpFunctionalTestCase extends AbstractEmailFunctionalTestCase
22  {
23  
24      public SmtpFunctionalTestCase(ConfigVariant variant, String configResources)
25      {
26          super(variant, STRING_MESSAGE, "smtp", configResources);
27      }
28  
29      @Parameters
30      public static Collection<Object[]> parameters()
31      {
32          return Arrays.asList(new Object[][]{
33              {ConfigVariant.SERVICE, "smtp-functional-test-service.xml"},
34              {ConfigVariant.FLOW, "smtp-functional-test-flow.xml"}
35          });
36      }      
37      
38      @Test
39      public void testSend() throws Exception
40      {
41          doSend();
42      }
43  
44      @Override
45      public void verifyMessage(MimeMessage message) throws Exception
46      {
47          super.verifyMessage(message);
48          assertEquals(DEFAULT_MESSAGE, message.getSubject());
49      }
50  
51  }