|
Commons Net example source code file (MVSFTPEntryParserTest.java)
The Commons Net MVSFTPEntryParserTest.java source code
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.net.ftp.parser;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.net.ftp.FTPFile;
import org.apache.commons.net.ftp.FTPFileEntryParser;
/**
* Changed on August 31, 2006<br/>
* Test suite addapted to new MVSFTPEntryParser.java.
* @author <a href="mailto:henrik.sorensen@balcab.ch">Henrik Sorensen
*
* Created on Apr 6, 2005<br/>
* @author <a href="mailto:wnoto@openfinance.com">William Noto
* @version $Id: MVSFTPEntryParserTest.java,v 1.16 2005/01/02 03:17:50 scohen Exp $
*/
public class MVSFTPEntryParserTest extends FTPParseTestFramework {
private static final String[] goodsamplesDatasetList = { /* Note, if the string begins with SAVE, the parsed entry is stored in the List saveftpfiles */
// "Volume Unit Referred Ext Used Recfm Lrecl BlkSz Dsorg Dsname",
"SAVE00 3390 2004/06/23 1 1 FB 128 6144 PS INCOMING.RPTBM023.D061704",
"SAVE01 3390 2004/06/23 1 1 FB 128 6144 PO INCOMING.RPTBM024.D061704",
"SAVE02 3390 2004/06/23 1 1 FB 128 6144 PO-E INCOMING.RPTBM025.D061704",
"PSMLC1 3390 2005/04/04 1 1 VB 27994 27998 PS file3.I",
"PSMLB9 3390 2005/04/04 1 1 VB 27994 27998 PS file4.I.BU",
"PSMLB6 3390 2005/04/05 1 1 VB 27994 27998 PS file3.I.BU",
"PSMLC6 3390 2005/04/05 1 1 VB 27994 27998 PS file6.I",
"PSMLB7 3390 2005/04/04 1 1 VB 27994 27998 PS file7.O",
"PSMLC6 3390 2005/04/05 1 1 VB 27994 27998 PS file7.O.BU",
"FPFS49 3390 2004/06/23 1 1 FB 128 6144 PO-E INCOMING.RPTBM026.D061704",
"FPFS41 3390 2004/06/23 1 1 FB 128 6144 PS INCOMING.RPTBM056.D061704",
"FPFS25 3390 2004/06/23 1 1 FB 128 6144 PS INCOMING.WTM204.D061704", };
private static final String[] goodsamplesMemberList = {/* Note, if the string begins with SAVE, the parsed entry is stored in the List saveftpfiles */
"Name VV.MM Created Changed Size Init Mod Id",
"SAVE03 01.03 2002/09/12 2002/10/11 09:37 11 11 0 KIL001",
"SAVE04 ", // no statistics
"TBSHELF1 01.03 2002/09/12 2002/10/11 09:37 11 11 0 KIL001",
"TBSHELF2 01.03 2002/09/12 2002/10/11 09:37 11 11 0 KIL001",
"TBSHELF3 01.03 2002/09/12 2002/10/11 09:37 11 11 0 KIL001",
"TBSHELF4 01.03 2002/09/12 2002/10/11 09:37 11 11 0 KIL001", };
private static final String[] goodsamplesJES1List = { /* no header for JES1 (JES Interface level 1) */
/* Note, if the string begins with SAVE, the parsed entry is stored in the List saveftpfiles */
"IBMUSER1 JOB01906 OUTPUT 3 Spool Files", };
private static final String[] goodsamplesJES2List = { /* JES2 (JES Interface level 2) */
/* Note, if the string begins with SAVE, the parsed entry is stored in the List saveftpfiles */
//"JOBNAME JOBID OWNER STATUS CLASS",
"IBMUSER2 JOB01906 IBMUSER OUTPUT A RC=0000 3 spool files",
"IBMUSER TSU01830 IBMUSER OUTPUT TSU ABEND=522 3 spool files", };
private static final String[] badsamples = {
"MigratedP201.$FTXPBI1.$CF2ITB.$AAB0402.I",
"PSMLC133902005/04/041VB2799427998PSfile1.I", "file2.O", };
/**
* @see junit.framework.TestCase#TestCase(String)
*/
public MVSFTPEntryParserTest(String name) {
super(name);
}
/* (non-Javadoc)
* @see org.apache.commons.net.ftp.parser.CompositeFTPParseTestFramework#getBadListings()
*/
@Override
protected String[] getBadListing() {
return badsamples;
}
/* (non-Javadoc)
* @see org.apache.commons.net.ftp.parser.CompositeFTPParseTestFramework#getGoodListings()
*/
@Override
protected String[] getGoodListing() {
return goodsamplesDatasetList;
}
protected List<String[]> getAllGoodListings() {
List<String[]> l = new ArrayList
Other Commons Net examples (source code examples)Here is a short list of links related to this Commons Net MVSFTPEntryParserTest.java source code file: |
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.