View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.transport.sftp;
8   
9   import org.mule.api.transport.Connector;
10  import org.mule.transport.AbstractConnectorTestCase;
11  
12  import org.junit.Test;
13  
14  public class SftpConnectorTestCase extends AbstractConnectorTestCase
15  {
16  
17      /*
18       * For general guidelines on writing transports see
19       * http://www.mulesource.org/display/MULE2USER/Creating+Transports
20       */
21  
22      public Connector createConnector() throws Exception
23      {
24          /*
25           * IMPLEMENTATION NOTE: Create and initialise an instance of your connector
26           * here. Do not actually call the connect method.
27           */
28  
29          SftpConnector c = new SftpConnector(muleContext);
30          c.setName("Test");
31          // TODO Set any additional properties on the connector here
32          return c;
33      }
34  
35      public String getTestEndpointURI()
36      {
37          return "sftp://ms/data";
38      }
39  
40      public Object getValidMessage() throws Exception
41      {
42          return "payload";
43      }
44  
45      @Test
46      public void testProperties() throws Exception
47      {
48          // TODO test setting and retrieving any custom properties on the
49          // Connector as necessary
50      }
51  
52      @Override
53      public void testConnectorMessageRequesterFactory()
54      {
55          // No MessageRequesterFactory
56      }
57  
58  }