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

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.CompositeFTPParseTestFramework
                  extended by org.apache.commons.net.ftp.parser.NTFTPEntryParserTest
All Implemented Interfaces:
junit.framework.Test

public class NTFTPEntryParserTest
extends CompositeFTPParseTestFramework

Version:
$Id: NTFTPEntryParserTest.java 629276 2008-02-19 23:31:25Z rwinston $
Author:
Steve Cohen

Field Summary
 
Fields inherited from class org.apache.commons.net.ftp.parser.FTPParseTestFramework
df
 
Constructor Summary
NTFTPEntryParserTest(String name)
           
 
Method Summary
protected  void doAdditionalGoodTests(String test, org.apache.commons.net.ftp.FTPFile f)
          during processing you could hook here to do additional tests
protected  String[][] getBadListings()
          Method getBadListing.
protected  String[][] getGoodListings()
          Method getGoodListing.
protected  org.apache.commons.net.ftp.FTPFileEntryParser getParser()
          Method getParser.
static junit.framework.TestSuite suite()
          Method suite.
 void testDirectoryBeginningWithNumber()
          test condition reported as bug 20259.
 void testDirectoryBeginningWithNumberFollowedBySpaces()
           
 void testGroupNameWithSpaces()
          Test that group names with embedded spaces can be handled correctly
 void testParseFieldsOnDirectory()
          Method testParseFieldsOnDirectory.
 void testParseFieldsOnFile()
          Method testParseFieldsOnFile.
 void testParseLeadingDigits()
           
 
Methods inherited from class org.apache.commons.net.ftp.parser.CompositeFTPParseTestFramework
getBadListing, getGoodListing, testBadListing, testConsistentListing, testInconsistentListing
 
Methods inherited from class org.apache.commons.net.ftp.parser.FTPParseTestFramework
doAdditionalBadTests, nullFileOrNullDate, setUp, testGoodListing
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, 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, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NTFTPEntryParserTest

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

getGoodListings

protected String[][] getGoodListings()
Description copied from class: CompositeFTPParseTestFramework
Method getGoodListing. Implementors must provide multiple listing that passes and must force the composite parser to switch the FtpEntryParser

Specified by:
getGoodListings in class CompositeFTPParseTestFramework
Returns:
String[]
See Also:
CompositeFTPParseTestFramework.getGoodListings()

getBadListings

protected String[][] getBadListings()
Description copied from class: CompositeFTPParseTestFramework
Method getBadListing. Implementors must provide multiple listing that contains failures and must force the composite parser to switch the FtpEntryParser

Specified by:
getBadListings in class CompositeFTPParseTestFramework
Returns:
String[]
See Also:
CompositeFTPParseTestFramework.getBadListings()

getParser

protected org.apache.commons.net.ftp.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()

suite

public static junit.framework.TestSuite suite()
Method suite.

Returns:
TestSuite

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()

testParseLeadingDigits

public void testParseLeadingDigits()

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,
                                     org.apache.commons.net.ftp.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

testDirectoryBeginningWithNumber

public void testDirectoryBeginningWithNumber()
                                      throws Exception
test condition reported as bug 20259. directory with name beginning with a numeric character was not parsing correctly

Throws:
Exception

testDirectoryBeginningWithNumberFollowedBySpaces

public void testDirectoryBeginningWithNumberFollowedBySpaces()
                                                      throws Exception
Throws:
Exception

testGroupNameWithSpaces

public void testGroupNameWithSpaces()
Test that group names with embedded spaces can be handled correctly



Copyright © 1997-2009 Apache Software Foundation. All Rights Reserved.