FileDocCategorySizeDatePackage
MVSFTPEntryParserTest.javaAPI DocApache Commons NET 1.4.1 API4311Sat Dec 03 10:05:50 GMT 2005org.apache.commons.net.ftp.parser

MVSFTPEntryParserTest

public class MVSFTPEntryParserTest extends FTPParseTestFramework
Created on Apr 6, 2005
author
William Noto
version
$Id: NTFTPEntryParserTest.java,v 1.16 2005/01/02 03:17:50 scohen Exp $

Fields Summary
private static final String[]
goodsamples
private static final String[]
badsamples
Constructors Summary
public MVSFTPEntryParserTest(String name)

see
junit.framework.TestCase#TestCase(String)

    
           
        
    
        super(name);
    
Methods Summary
protected java.lang.String[]getBadListing()

        return badsamples;
    
protected java.lang.String[]getGoodListing()

        return goodsamples;
    
protected org.apache.commons.net.ftp.FTPFileEntryParsergetParser()

see
org.apache.commons.net.ftp.parser.FTPParseTestFramework#getParser()

        return new CompositeFileEntryParser(new FTPFileEntryParser[]
        {
            new MVSFTPEntryParser(),
        });
    
public static junit.framework.TestSuitesuite()
Method suite.

return
TestSuite

        return(new TestSuite(MVSFTPEntryParserTest.class));
    
public voidtestParseFieldsOnDirectory()

        // I don't really know how to test this because the MVS system that I 
        // connect with does not allow me to create directories.         
    
public voidtestParseFieldsOnFile()

        FTPFile file = getParser().parseFTPEntry("Migrated                                                file1.I");
        assertNotNull("Could not parse entry.", file);
        assertTrue("Should have been a file.", file.isFile());
        assertEquals("file1.I", file.getName());
        
        FTPFile file2 = getParser().parseFTPEntry("PSMLC1 3390   2005/04/04  1    1  VB   27994 27998  PS  file2.I");
        assertNotNull("Could not parse entry.", file2);
        assertTrue("Should have been a file.", file2.isFile());
        assertEquals("file2.I", file2.getName());