001: /**
002: *
003: * edtFTPj
004: *
005: * Copyright (C) 2000 Enterprise Distributed Technologies Ltd
006: *
007: * www.enterprisedt.com
008: *
009: * This library is free software; you can redistribute it and/or
010: * modify it under the terms of the GNU Lesser General Public
011: * License as published by the Free Software Foundation; either
012: * version 2.1 of the License, or (at your option) any later version.
013: *
014: * This library is distributed in the hope that it will be useful,
015: * but WITHOUT ANY WARRANTY; without even the implied warranty of
016: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
017: * Lesser General Public License for more details.
018: *
019: * You should have received a copy of the GNU Lesser General Public
020: * License along with this library; if not, write to the Free Software
021: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
022: *
023: * Bug fixes, suggestions and comments should be should posted on
024: * http://www.enterprisedt.com/forums/index.php
025: *
026: * Change Log:
027: *
028: * $Log: TestFeatures.java,v $
029: * Revision 1.4 2005/07/15 17:30:06 bruceb
030: * rework of unit testing structure
031: *
032: * Revision 1.3 2005/06/03 11:27:05 bruceb
033: * comment update
034: *
035: * Revision 1.2 2004/09/18 14:28:23 bruceb
036: * rename test method
037: *
038: * Revision 1.1 2004/08/31 10:44:17 bruceb
039: * test code
040: *
041: *
042: */package com.enterprisedt.net.ftp.test;
043:
044: import junit.framework.Test;
045: import junit.framework.TestSuite;
046:
047: import com.enterprisedt.net.ftp.FTPClient;
048: import com.enterprisedt.net.ftp.FTPException;
049:
050: /**
051: * Test general methods such as site() and quote()
052: *
053: * @author Bruce Blackshaw
054: * @version $Revision: 1.4 $
055: */
056: public class TestFeatures extends FTPTestCase {
057:
058: /**
059: * Revision control id
060: */
061: public static String cvsId = "@(#)$Id: TestFeatures.java,v 1.4 2005/07/15 17:30:06 bruceb Exp $";
062:
063: /**
064: * Get name of log file
065: *
066: * @return name of file to log to
067: */
068: protected String getLogName() {
069: return "TestFeatures.log";
070: }
071:
072: /**
073: * Test features() command
074: */
075: public void testFeatures() throws Exception {
076:
077: connect();
078:
079: // system
080: try {
081: String[] features = ((FTPClient) ftp).features();
082: for (int i = 0; i < features.length; i++)
083: log.debug("Feature: " + features[i]);
084: } catch (FTPException ex) {
085: log.warn("FEAT not implemented");
086: }
087:
088: // complete
089: ftp.quit();
090: }
091:
092: /**
093: * Automatic test suite construction
094: *
095: * @return suite of tests for this class
096: */
097: public static Test suite() {
098: return new TestSuite(TestFeatures.class);
099: }
100:
101: /**
102: * Enable our class to be run, doing the
103: * tests
104: */
105: public static void main(String[] args) {
106: junit.textui.TestRunner.run(suite());
107: }
108:
109: }
|