org.apache.commons.net.ftp.parser
Class UnixFTPEntryParserTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.commons.net.ftp.parser.FTPParseTestFramework
              extended by org.apache.commons.net.ftp.parser.UnixFTPEntryParserTest
All Implemented Interfaces:
junit.framework.Test

public class UnixFTPEntryParserTest
extends FTPParseTestFramework

Version:
$Id: UnixFTPEntryParserTest.java 1489533 2013-06-04 17:49:00Z sebb $
Author:
Steve Cohen

Field Summary
 
Fields inherited from class org.apache.commons.net.ftp.parser.FTPParseTestFramework
df
 
Constructor Summary
UnixFTPEntryParserTest(String name)
           
 
Method Summary
protected  void doAdditionalGoodTests(String test, FTPFile f)
          during processing you could hook here to do additional tests
protected  String[] getBadListing()
          Method getBadListing.
protected  String[] getGoodListing()
          Method getGoodListing.
protected  FTPFileEntryParser getParser()
          Method getParser.
 void testCorrectGroupNameParsing()
           
 void testFilenamesWithEmbeddedNumbers()
           
 void testGroupNameWithSpaces()
           
 void testNameWIthPunctuation()
           
 void testNET294()
           
 void testNoSpacesBeforeFileSize()
           
 void testNumericDateFormat()
           
 void testOwnerAndGroupNameWithSpaces()
           
 void testOwnerNameWithSpaces()
           
 void testParseFieldsOnDirectory()
          Method testParseFieldsOnDirectory.
 void testParseFieldsOnFile()
          Method testParseFieldsOnFile.
 void testTrailingSpaces()
           
 
Methods inherited from class org.apache.commons.net.ftp.parser.FTPParseTestFramework
doAdditionalBadTests, nullFileOrNullDate, setUp, testBadListing, testGoodListing
 
Methods inherited from class junit.framework.TestCase
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnixFTPEntryParserTest

public UnixFTPEntryParserTest(String name)
See Also:
TestCase.TestCase(String)
Method Detail

getBadListing

protected String[] getBadListing()
Description copied from class: FTPParseTestFramework
Method getBadListing. Implementors must provide a listing that contains failures.

Specified by:
getBadListing in class FTPParseTestFramework
Returns:
String[]
See Also:
FTPParseTestFramework.getBadListing()

getGoodListing

protected String[] getGoodListing()
Description copied from class: FTPParseTestFramework
Method getGoodListing. Implementors must provide a listing that passes.

Specified by:
getGoodListing in class FTPParseTestFramework
Returns:
String[]
See Also:
FTPParseTestFramework.getGoodListing()

testNumericDateFormat

public void testNumericDateFormat()

getParser

protected FTPFileEntryParser getParser()
Description copied from class: FTPParseTestFramework
Method getParser. Provide the parser to use for testing.

Specified by:
getParser in class FTPParseTestFramework
Returns:
FTPFileEntryParser
See Also:
FTPParseTestFramework.getParser()

testOwnerNameWithSpaces

public void testOwnerNameWithSpaces()

testOwnerAndGroupNameWithSpaces

public void testOwnerAndGroupNameWithSpaces()

testNET294

public void testNET294()

testGroupNameWithSpaces

public void testGroupNameWithSpaces()

testTrailingSpaces

public void testTrailingSpaces()

testNameWIthPunctuation

public void testNameWIthPunctuation()

testNoSpacesBeforeFileSize

public void testNoSpacesBeforeFileSize()

testCorrectGroupNameParsing

public void testCorrectGroupNameParsing()

testFilenamesWithEmbeddedNumbers

public void testFilenamesWithEmbeddedNumbers()

testParseFieldsOnDirectory

public void testParseFieldsOnDirectory()
                                throws Exception
Description copied from class: FTPParseTestFramework
Method testParseFieldsOnDirectory. Provide a test to show that fields on a directory entry are parsed correctly.

Specified by:
testParseFieldsOnDirectory in class FTPParseTestFramework
Throws:
Exception
See Also:
FTPParseTestFramework.testParseFieldsOnDirectory()

testParseFieldsOnFile

public void testParseFieldsOnFile()
                           throws Exception
Description copied from class: FTPParseTestFramework
Method testParseFieldsOnFile. Provide a test to show that fields on a file entry are parsed correctly.

Specified by:
testParseFieldsOnFile in class FTPParseTestFramework
Throws:
Exception
See Also:
FTPParseTestFramework.testParseFieldsOnFile()

doAdditionalGoodTests

protected void doAdditionalGoodTests(String test,
                                     FTPFile f)
Description copied from class: FTPParseTestFramework
during processing you could hook here to do additional tests

Overrides:
doAdditionalGoodTests in class FTPParseTestFramework
Parameters:
test - raw entry
f - parsed entry


Copyright © 2001-2014 The Apache Software Foundation. All Rights Reserved.