1
2
3
4
5
6
7
8
9
10
11 package org.mule.transport.ftp.server;
12
13 import org.apache.commons.net.ftp.FTPClient;
14
15 import junit.framework.TestCase;
16
17
18
19
20 public class ServerTest extends TestCase
21 {
22 private Server ftpServer = null;
23
24 public void setUp() throws Exception
25 {
26 ftpServer = new Server(Server.DEFAULT_PORT);
27 }
28
29
30
31
32
33
34
35 public void testServer() throws Exception
36 {
37 FTPClient ftpClient = new FTPClient();
38 ftpClient.connect("localhost", Server.DEFAULT_PORT);
39 ftpClient.login("admin", "admin");
40 }
41
42 public void tearDown()
43 {
44 ftpServer.stop();
45 ftpServer = null;
46 }
47 }