Methods Summary |
---|
protected void | doAdditionalBadTests(java.lang.String test, org.apache.commons.net.ftp.FTPFile f)during processing you could hook here to do additional tests
|
protected void | doAdditionalGoodTests(java.lang.String test, org.apache.commons.net.ftp.FTPFile f)during processing you could hook here to do additional tests
|
protected abstract java.lang.String[] | getBadListing()Method getBadListing.
Implementors must provide a listing that contains failures.
|
protected abstract java.lang.String[] | getGoodListing()Method getGoodListing.
Implementors must provide a listing that passes.
|
protected abstract org.apache.commons.net.ftp.FTPFileEntryParser | getParser()Method getParser.
Provide the parser to use for testing.
|
protected void | setUp()
super.setUp();
parser = getParser();
df = new SimpleDateFormat("EEE MMM dd HH:mm:ss yyyy", Locale.US);
|
public void | testBadListing()Method testBadListing.
Tests that parser provided failures actually fail.
String[] badsamples = getBadListing();
for (int i = 0; i < badsamples.length; i++)
{
String test = badsamples[i];
FTPFile f = parser.parseFTPEntry(test);
assertNull("Should have Failed to parse " + test,
f);
doAdditionalBadTests(test, f);
}
|
public void | testGoodListing()Method testGoodListing.
Test that parser provided listings pass.
String[] goodsamples = getGoodListing();
for (int i = 0; i < goodsamples.length; i++)
{
String test = goodsamples[i];
FTPFile f = parser.parseFTPEntry(test);
assertNotNull("Failed to parse " + test,
f);
doAdditionalGoodTests(test, f);
}
|
public abstract void | testParseFieldsOnDirectory()Method testParseFieldsOnDirectory.
Provide a test to show that fields on a directory entry are parsed correctly.
|
public abstract void | testParseFieldsOnFile()Method testParseFieldsOnFile.
Provide a test to show that fields on a file entry are parsed correctly.
|