package com.new.sapi.protocol;
import
java.io.IOException;
import org.junit.Before;
import org.junit.After;
import org.junit.Test;
import static org.junit.Assert;
import com.new.sapi.ServiceAccess;
/*** 测试nt和linux系统下ftp的连接功能***/
public void FtpConnectTest {
FTPService ftp_nt = null;
FTPService ftp_linux = null;
@Before
public void setUp() throws Exception {
ftp_nt = ServiceAcess.getFTPService();
ftp_linux = ServiceAcess.getFTPService();
}
@After
public void tearDown() throws Exception {
ftp_nt.disConnect();
ftp_linux.disConnect();
}
/**
*Test method for {@link com.new.sapi.protocol.FTPService#connect(java.lang.String,java.lang.String,java.lang.String)}
**/
@Test
public void testConnectStringStringString() {
try {
assertTrue(ftp_nt.connect("10.129.124.61","iconsole","123456"));
assertTrue(ftp_linux.connect("10.129.172.25","jos","jos"));
} catch (IOException e) {
e.printStackTrace();
}
}
}