View Javadoc

1   /*
2    * $Id: ImapsConnectorTestCase.java 20321 2010-11-24 15:21:24Z dfeist $
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.connectors;
12  
13  import org.mule.api.transport.Connector;
14  import org.mule.transport.email.ImapsConnector;
15  
16  import com.icegreen.greenmail.util.ServerSetup;
17  
18  /**
19   * Simple tests for pulling from an IMAP server.
20   */
21  public class ImapsConnectorTestCase extends AbstractReceivingMailConnectorTestCase
22  {
23      public ImapsConnectorTestCase()
24      {
25          super(ServerSetup.PROTOCOL_IMAPS);
26      }
27  
28      public Connector createConnector() throws Exception
29      {
30          ImapsConnector connector = new ImapsConnector(muleContext);
31          connector.setName("ImapsConnector");
32          connector.setCheckFrequency(POLL_PERIOD_MS);
33          connector.setServiceOverrides(newEmailToStringServiceOverrides());
34          connector.setTrustStore("greenmail.jks");
35          connector.setTrustStorePassword("changeit");
36          return connector;
37      }
38  }