|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
com.enterprisedt.net.ftp.test.FTPTestCase
public abstract class FTPTestCase
Generic JUnit test class for FTP, that provides some useful methods for subclasses that implement the actual test cases
Field Summary | |
---|---|
protected int |
bulkCount
Number of operations for stress testing |
static java.lang.String |
cvsId
Revision control id |
protected FTPClientInterface |
ftp
Reference to the FTP client |
protected int |
highPort
Highest port |
protected java.lang.String |
localBigFile
Big local file for testing |
protected java.lang.String |
localBigTextFile
Big local text file for testing |
protected java.lang.String |
localBinaryFile
Local binary file |
protected java.lang.String |
localDataDir
Local data directory |
protected java.lang.String |
localEmptyFile
Local empty file |
protected java.lang.String |
localTestDir
Local test dir |
protected java.lang.String |
localTextFile
Local text file |
protected java.lang.String |
localUnixTextFile
Local text file |
protected Logger |
log
Log stream |
protected java.lang.String |
logDir
Log directory |
protected int |
lowPort
Lowest port |
protected java.util.Properties |
props
Loaded properties |
protected java.lang.String |
remoteBinaryFile
Remote binary file |
protected java.lang.String |
remoteEmptyDir
Remote empty dir |
protected java.lang.String |
remoteEmptyFile
Remote empty file |
protected java.lang.String |
remoteTextFile
Remote text file |
protected java.lang.String |
testdir
Remote directory that remote test files/dirs are in |
protected TestTools |
tools
Server specific tools |
Constructor Summary | |
---|---|
FTPTestCase()
Initialize test properties |
Method Summary | |
---|---|
protected void |
assertIdentical(byte[] buf1,
byte[] buf2)
Test to see if two buffers are identical, byte for byte |
protected void |
assertIdentical(java.io.File file1,
java.io.File file2)
Test to see if two files are identical, byte for byte |
protected void |
assertIdentical(java.lang.String file1,
java.lang.String file2)
Test to see if two files are identical, byte for byte |
protected void |
bulkTransfer(java.lang.String localFile)
Transfer back and forth multiple times |
protected void |
connect()
Connect to the server and setup log stream |
protected java.lang.String |
generateRandomFilename()
Generate a random file name for testing |
protected abstract java.lang.String |
getLogName()
Get name of log file |
protected void |
print(java.io.File[] list)
Helper method for dumping a listing |
protected void |
print(FTPFile[] list)
Helper method for dumping a listing |
protected void |
print(java.lang.String[] list)
Helper method for dumping a listing |
protected void |
setUp()
Setup is called before running each test |
protected void |
tearDown()
Deallocate resources at close of each test |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static java.lang.String cvsId
protected Logger log
protected FTPClientInterface ftp
protected int lowPort
protected int highPort
protected java.lang.String testdir
protected java.lang.String remoteTextFile
protected java.lang.String localTextFile
protected java.lang.String localUnixTextFile
protected java.lang.String remoteBinaryFile
protected java.lang.String localBinaryFile
protected java.lang.String localEmptyFile
protected java.lang.String remoteEmptyFile
protected java.lang.String remoteEmptyDir
protected java.lang.String localBigFile
protected java.lang.String localBigTextFile
protected java.lang.String localTestDir
protected java.lang.String logDir
protected java.lang.String localDataDir
protected int bulkCount
protected java.util.Properties props
protected TestTools tools
Constructor Detail |
---|
public FTPTestCase()
Method Detail |
---|
protected void setUp() throws java.lang.Exception
setUp
in class junit.framework.TestCase
java.lang.Exception
protected void tearDown() throws java.lang.Exception
tearDown
in class junit.framework.TestCase
java.lang.Exception
protected void connect() throws java.lang.Exception
java.lang.Exception
protected java.lang.String generateRandomFilename()
protected void assertIdentical(byte[] buf1, byte[] buf2) throws java.lang.Exception
buf1
- first bufferbuf2
- second buffer
java.lang.Exception
protected void assertIdentical(java.lang.String file1, java.lang.String file2) throws java.lang.Exception
file1
- name of first filefile2
- name of second file
java.lang.Exception
protected void assertIdentical(java.io.File file1, java.io.File file2) throws java.lang.Exception
file1
- first file objectfile2
- second file object
java.lang.Exception
protected void bulkTransfer(java.lang.String localFile) throws java.lang.Exception
java.lang.Exception
protected void print(java.lang.String[] list)
list
- directory listing to printprotected void print(java.io.File[] list)
list
- directory listing to printprotected void print(FTPFile[] list)
list
- directory listing to printprotected abstract java.lang.String getLogName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |