View Javadoc

1   /*
2    * $Id: SftpConnectorTestCase.java 22377 2011-07-11 12:41:42Z dirk.olmes $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.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.sftp;
12  
13  import org.mule.api.transport.Connector;
14  import org.mule.transport.AbstractConnectorTestCase;
15  
16  import org.junit.Test;
17  
18  public class SftpConnectorTestCase extends AbstractConnectorTestCase
19  {
20  
21      /*
22       * For general guidelines on writing transports see
23       * http://www.mulesource.org/display/MULE2USER/Creating+Transports
24       */
25  
26      public Connector createConnector() throws Exception
27      {
28          /*
29           * IMPLEMENTATION NOTE: Create and initialise an instance of your connector
30           * here. Do not actually call the connect method.
31           */
32  
33          SftpConnector c = new SftpConnector(muleContext);
34          c.setName("Test");
35          // TODO Set any additional properties on the connector here
36          return c;
37      }
38  
39      public String getTestEndpointURI()
40      {
41          return "sftp://ms/data";
42      }
43  
44      public Object getValidMessage() throws Exception
45      {
46          return "payload";
47      }
48  
49      @Test
50      public void testProperties() throws Exception
51      {
52          // TODO test setting and retrieving any custom properties on the
53          // Connector as necessary
54      }
55  
56      @Override
57      public void testConnectorMessageRequesterFactory()
58      {
59          // No MessageRequesterFactory
60      }
61  
62  }