Methods Summary |
---|
protected java.lang.String[] | getBadListing()
return (badsamples);
|
protected java.lang.String[] | getGoodListing()
return (goodsamples);
|
protected org.apache.commons.net.ftp.FTPFileEntryParser | getParser()
ConfigurableFTPFileEntryParserImpl parser =
new OS2FTPEntryParser();
parser.configure(null);
return parser;
|
public static junit.framework.TestSuite | suite()Method suite.
return (new TestSuite(OS2FTPEntryParserTest.class));
|
public void | testParseFieldsOnDirectory()
FTPFile dir = getParser().parseFTPEntry(" 0 DIR 11-28-97 09:42 PC");
assertNotNull("Could not parse entry.", dir);
assertTrue("Should have been a directory.",
dir.isDirectory());
assertEquals(0,dir.getSize());
assertEquals("PC", dir.getName());
assertEquals("Fri Nov 28 09:42:00 1997",
df.format(dir.getTimestamp().getTime()));
|
public void | testParseFieldsOnFile()
FTPFile file = getParser().parseFTPEntry("5000000000 A 11-17-98 16:07 POPUPLOG.OS2");
assertNotNull("Could not parse entry.", file);
assertTrue("Should have been a file.",
file.isFile());
assertEquals(5000000000L, file.getSize());
assertEquals("POPUPLOG.OS2", file.getName());
assertEquals("Tue Nov 17 16:07:00 1998",
df.format(file.getTimestamp().getTime()));
|