commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r919474 - in /commons/proper/io/trunk: ./ src/test/org/apache/commons/io/ src/test/org/apache/commons/io/comparator/ src/test/org/apache/commons/io/filefilter/ src/test/org/apache/commons/io/input/ src/test/org/apache/commons/io/output/
Date Fri, 05 Mar 2010 16:31:44 GMT
Author: sebb
Date: Fri Mar  5 16:31:43 2010
New Revision: 919474

URL: http://svn.apache.org/viewvc?rev=919474&view=rev
Log:
Tidy up tests:
- remove suite() and main() methods
- Deleted package test classes and All test classes
- Allow Ant build to run a single test; default to all

Removed:
    commons/proper/io/trunk/src/test/org/apache/commons/io/AllIOTestSuite.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/PackageTestSuite.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/PackageTestSuite.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/PackageTestSuite.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/input/PackageTestSuite.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/output/PackageTestSuite.java
Modified:
    commons/proper/io/trunk/build.xml
    commons/proper/io/trunk/pom.xml
    commons/proper/io/trunk/src/test/org/apache/commons/io/CopyUtilsTest.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/DirectoryWalkerTestCase.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/DirectoryWalkerTestCaseJava4.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/FileCleanerTestCase.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/FileCleaningTrackerTestCase.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/FileDeleteStrategyTestCase.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/FileSystemUtilsTestCase.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsCleanDirectoryTestCase.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsCleanSymlinksTestCase.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsTestCase.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsWaitForTestCase.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/FilenameUtilsTestCase.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/HexDumpTest.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/IOCaseTestCase.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/IOUtilsCopyTestCase.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/IOUtilsWriteTestCase.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/LineIteratorTestCase.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/CompositeFileComparatorTest.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/DefaultFileComparatorTest.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/DirectoryFileComparatorTest.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/ExtensionFileComparatorTest.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/LastModifiedFileComparatorTest.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/NameFileComparatorTest.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/PathFileComparatorTest.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/SizeFileComparatorTest.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/AndFileFilterTestCase.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/FileFilterTestCase.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/OrFileFilterTestCase.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/RegexFileFilterTestCase.java

Modified: commons/proper/io/trunk/build.xml
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/build.xml?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/build.xml (original)
+++ commons/proper/io/trunk/build.xml Fri Mar  5 16:31:43 2010
@@ -180,21 +180,22 @@
 
   <target name="test"  depends="compile.tests"
                        description="Run all unit test cases">
-    <antcall target="exec.test"><param name="testclass" value="org.apache.commons.io.PackageTestSuite"/></antcall>
-    <antcall target="exec.test"><param name="testclass" value="org.apache.commons.io.comparator.PackageTestSuite"/></antcall>
-    <antcall target="exec.test"><param name="testclass" value="org.apache.commons.io.filefilter.PackageTestSuite"/></antcall>
-    <antcall target="exec.test"><param name="testclass" value="org.apache.commons.io.input.PackageTestSuite"/></antcall>
-    <antcall target="exec.test"><param name="testclass" value="org.apache.commons.io.output.PackageTestSuite"/></antcall>
-
-  </target>
-
-  <target name="exec.test" description="Run a unit test case">
-    <echo message="Running Test ${testclass} ..."/>
-    <java classname="${test.runner}" fork="yes"
-        failonerror="${test.failonerror}">
-      <arg value="${testclass}"/>
+    <mkdir dir="${build.home}/ant-reports"/>
+    <junit printsummary="true" showoutput="true" fork="yes" haltonfailure="${test.failonerror}">
       <classpath refid="test.classpath"/>
-    </java>
+      <formatter type="plain" usefile="true" />
+      <!-- If test.entry is defined, run a single test, otherwise run all valid tests
-->
+      <test name="${test.entry}" if="test.entry"/>
+      <batchtest todir="${build.home}/ant-reports" unless="test.entry">
+        <fileset dir="${test.home}">
+          <include name="**/*Test*.java"/>
+          <!-- Test support files -->
+          <exclude name="**/testtools/**"/>
+          <!-- Ant JUnit does not handle abstract classes -->
+          <exclude name="**/*AbstractTestCase*"/>
+        </fileset>
+      </batchtest>
+    </junit>
   </target>
 
 

Modified: commons/proper/io/trunk/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/pom.xml?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/pom.xml (original)
+++ commons/proper/io/trunk/pom.xml Fri Mar  5 16:31:43 2010
@@ -232,8 +232,6 @@
             </includes>
             <excludes>
               <exclude>**/*AbstractTestCase*</exclude>
-              <exclude>**/AllIOTestSuite*</exclude>
-              <exclude>**/PackageTestSuite*</exclude>
               <exclude>**/testtools/**</exclude>
 
               <!-- http://jira.codehaus.org/browse/SUREFIRE-44 -->

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/CopyUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/CopyUtilsTest.java?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/CopyUtilsTest.java (original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/CopyUtilsTest.java Fri Mar  5 16:31:43
2010
@@ -23,10 +23,6 @@
 import java.io.Writer;
 import java.util.Arrays;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
 import org.apache.commons.io.output.ByteArrayOutputStream;
 import org.apache.commons.io.testtools.FileBasedTestCase;
 import org.apache.commons.io.testtools.YellOnCloseInputStream;
@@ -57,14 +53,6 @@
 
     private byte[] inData = generateTestData(FILE_SIZE);
 
-    public static void main(String[] args) {
-        TestRunner.run(suite());
-    }
-
-    public static Test suite() {
-        return new TestSuite(CopyUtilsTest.class);
-    }
-
     public CopyUtilsTest(String testName) {
         super(testName);
     }

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/DirectoryWalkerTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/DirectoryWalkerTestCase.java?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/DirectoryWalkerTestCase.java (original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/DirectoryWalkerTestCase.java Fri
Mar  5 16:31:43 2010
@@ -25,9 +25,7 @@
 import java.util.List;
 
 import junit.framework.Assert;
-import junit.framework.Test;
 import junit.framework.TestCase;
-import junit.framework.TestSuite;
 
 import org.apache.commons.io.filefilter.FileFilterUtils;
 import org.apache.commons.io.filefilter.IOFileFilter;
@@ -71,10 +69,6 @@
     // Filter to exclude SVN files
     private static final IOFileFilter NOT_SVN = FileFilterUtils.makeSVNAware(null);
 
-    public static Test suite() {
-        return new TestSuite(DirectoryWalkerTestCase.class);
-    }
-
     /** Construct the TestCase using the name */
     public DirectoryWalkerTestCase(String name) {
         super(name);

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/DirectoryWalkerTestCaseJava4.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/DirectoryWalkerTestCaseJava4.java?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/DirectoryWalkerTestCaseJava4.java
(original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/DirectoryWalkerTestCaseJava4.java
Fri Mar  5 16:31:43 2010
@@ -25,9 +25,7 @@
 import java.util.List;
 
 import junit.framework.Assert;
-import junit.framework.Test;
 import junit.framework.TestCase;
-import junit.framework.TestSuite;
 
 import org.apache.commons.io.filefilter.FileFilterUtils;
 import org.apache.commons.io.filefilter.IOFileFilter;
@@ -72,10 +70,6 @@
     // Filter to exclude SVN files
     private static final IOFileFilter NOT_SVN = FileFilterUtils.makeSVNAware(null);
 
-    public static Test suite() {
-        return new TestSuite(DirectoryWalkerTestCaseJava4.class);
-    }
-
     /** Construct the TestCase using the name */
     public DirectoryWalkerTestCaseJava4(String name) {
         super(name);

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/FileCleanerTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/FileCleanerTestCase.java?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/FileCleanerTestCase.java (original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/FileCleanerTestCase.java Fri Mar
 5 16:31:43 2010
@@ -16,10 +16,6 @@
  */
 package org.apache.commons.io;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
 /**
  * This is used to test FileCleaner for correctness.
  *
@@ -36,14 +32,6 @@
         return FileCleaner.getInstance();
     }
 
-    public static void main(String[] args) {
-        TestRunner.run(suite());
-    }
-
-    public static Test suite() {
-        return new TestSuite(FileCleanerTestCase.class);
-    }
-
     public FileCleanerTestCase(String name) {
         super(name);
     }

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/FileCleaningTrackerTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/FileCleaningTrackerTestCase.java?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/FileCleaningTrackerTestCase.java
(original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/FileCleaningTrackerTestCase.java
Fri Mar  5 16:31:43 2010
@@ -22,10 +22,6 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
 import org.apache.commons.io.testtools.FileBasedTestCase;
 
 /**
@@ -46,14 +42,6 @@
     private File testFile;
     private FileCleaningTracker theInstance;
 
-    public static void main(String[] args) {
-        TestRunner.run(suite());
-    }
-
-    public static Test suite() {
-        return new TestSuite(FileCleaningTrackerTestCase.class);
-    }
-
     public FileCleaningTrackerTestCase(String name) {
         super(name);
         testFile = new File(getTestDirectory(), "file-test.txt");

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/FileDeleteStrategyTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/FileDeleteStrategyTestCase.java?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/FileDeleteStrategyTestCase.java
(original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/FileDeleteStrategyTestCase.java
Fri Mar  5 16:31:43 2010
@@ -19,9 +19,6 @@
 import java.io.File;
 import java.io.IOException;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
 import org.apache.commons.io.testtools.FileBasedTestCase;
 
 /**
@@ -32,10 +29,6 @@
  */
 public class FileDeleteStrategyTestCase extends FileBasedTestCase {
 
-    public static Test suite() {
-        return new TestSuite(FileDeleteStrategyTestCase.class);
-    }
-
     public FileDeleteStrategyTestCase(String name) {
         super(name);
     }

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/FileSystemUtilsTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/FileSystemUtilsTestCase.java?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/FileSystemUtilsTestCase.java (original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/FileSystemUtilsTestCase.java Fri
Mar  5 16:31:43 2010
@@ -25,10 +25,6 @@
 import java.io.OutputStream;
 import java.util.Locale;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
 import org.apache.commons.io.testtools.FileBasedTestCase;
 
 /**
@@ -38,20 +34,6 @@
  */
 public class FileSystemUtilsTestCase extends FileBasedTestCase {
 
-    public static void main(String[] args) {
-        TestRunner.run(suite());
-        
-//        try {
-//            System.out.println(FileSystemUtils.freeSpace("C:\\"));
-//        } catch (IOException ex) {
-//            ex.printStackTrace();
-//        }
-    }
-
-    public static Test suite() {
-        return new TestSuite(FileSystemUtilsTestCase.class);
-    }
-
     public FileSystemUtilsTestCase(String name) {
         super(name);
     }

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsCleanDirectoryTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsCleanDirectoryTestCase.java?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsCleanDirectoryTestCase.java
(original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsCleanDirectoryTestCase.java
Fri Mar  5 16:31:43 2010
@@ -21,10 +21,6 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
 import org.apache.commons.io.testtools.FileBasedTestCase;
 
 /**
@@ -36,14 +32,6 @@
 public class FileUtilsCleanDirectoryTestCase extends FileBasedTestCase {
     final File top = getLocalTestDirectory();
 
-    public static void main(String[] args) {
-        TestRunner.run(suite());
-    }
-
-    public static Test suite() {
-        return new TestSuite(FileUtilsCleanDirectoryTestCase.class);
-    }
-
     public FileUtilsCleanDirectoryTestCase(String name) {
         super(name);
     }

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsCleanSymlinksTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsCleanSymlinksTestCase.java?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsCleanSymlinksTestCase.java
(original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsCleanSymlinksTestCase.java
Fri Mar  5 16:31:43 2010
@@ -16,15 +16,11 @@
  */
 package org.apache.commons.io;
 
-import org.apache.commons.io.testtools.FileBasedTestCase;
-
 import java.io.File;
-import java.util.List;
 import java.util.ArrayList;
+import java.util.List;
 
-import junit.textui.TestRunner;
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import org.apache.commons.io.testtools.FileBasedTestCase;
 
 /**
  * Test cases for FileUtils.cleanDirectory() method that involve symlinks.
@@ -34,14 +30,6 @@
 
     final File top = getTestDirectory();
 
-    public static void main(String[] args) {
-        TestRunner.run(suite());
-    }
-
-    public static Test suite() {
-        return new TestSuite(FileUtilsCleanSymlinksTestCase.class);
-    }
-
     public FileUtilsCleanSymlinksTestCase(String name) {
         super(name);
     }

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsTestCase.java?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsTestCase.java (original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsTestCase.java Fri Mar
 5 16:31:43 2010
@@ -35,10 +35,6 @@
 import java.util.zip.CRC32;
 import java.util.zip.Checksum;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
 import org.apache.commons.io.filefilter.NameFileFilter;
 import org.apache.commons.io.filefilter.WildcardFileFilter;
 import org.apache.commons.io.testtools.FileBasedTestCase;
@@ -76,14 +72,6 @@
     private int testFile1Size;
     private int testFile2Size;
 
-    public static void main(String[] args) {
-        TestRunner.run(suite());
-    }
-
-    public static Test suite() {
-        return new TestSuite(FileUtilsTestCase.class);
-    }
-
     public FileUtilsTestCase(String name) {
         super(name);
 

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsWaitForTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsWaitForTestCase.java?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsWaitForTestCase.java (original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsWaitForTestCase.java Fri
Mar  5 16:31:43 2010
@@ -18,10 +18,6 @@
 
 import java.io.File;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
 import org.apache.commons.io.testtools.FileBasedTestCase;
 
 /**
@@ -34,14 +30,6 @@
     // This class has been broken out from FileUtilsTestCase
     // to solve issues as per BZ 38927
 
-    public static void main(String[] args) {
-        TestRunner.run(suite());
-    }
-
-    public static Test suite() {
-        return new TestSuite(FileUtilsWaitForTestCase.class);
-    }
-
     public FileUtilsWaitForTestCase(String name) {
         super(name);
     }

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/FilenameUtilsTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/FilenameUtilsTestCase.java?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/FilenameUtilsTestCase.java (original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/FilenameUtilsTestCase.java Fri
Mar  5 16:31:43 2010
@@ -21,10 +21,6 @@
 import java.util.Arrays;
 import java.util.Collection;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
 import org.apache.commons.io.testtools.FileBasedTestCase;
 
 /**
@@ -47,14 +43,6 @@
     private int testFile1Size;
     private int testFile2Size;
 
-    public static void main(String[] args) {
-        TestRunner.run(suite());
-    }
-
-    public static Test suite() {
-        return new TestSuite(FilenameUtilsTestCase.class);
-    }
-
     public FilenameUtilsTestCase(String name) {
         super(name);
 

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/HexDumpTest.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/HexDumpTest.java?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/HexDumpTest.java (original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/HexDumpTest.java Fri Mar  5 16:31:43
2010
@@ -255,15 +255,4 @@
         }
         return rval;
     }
-
-    /**
-     * main method to run the unit tests
-     *
-     * @param ignored_args
-     */
-
-    public static void main(String[] ignored_args) {
-        System.out.println("Testing io.HexDump functionality");
-        junit.textui.TestRunner.run(HexDumpTest.class);
-    }
 }

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/IOCaseTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/IOCaseTestCase.java?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/IOCaseTestCase.java (original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/IOCaseTestCase.java Fri Mar  5
16:31:43 2010
@@ -22,10 +22,6 @@
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
 import org.apache.commons.io.testtools.FileBasedTestCase;
 
 /**
@@ -38,14 +34,6 @@
 
     private static final boolean WINDOWS = (File.separatorChar == '\\');
 
-    public static void main(String[] args) {
-        TestRunner.run(suite());
-    }
-
-    public static Test suite() {
-        return new TestSuite(IOCaseTestCase.class);
-    }
-
     public IOCaseTestCase(String name) {
         super(name);
     }

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/IOUtilsCopyTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/IOUtilsCopyTestCase.java?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/IOUtilsCopyTestCase.java (original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/IOUtilsCopyTestCase.java Fri Mar
 5 16:31:43 2010
@@ -25,10 +25,6 @@
 import java.io.Writer;
 import java.util.Arrays;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
 import org.apache.commons.io.input.NullInputStream;
 import org.apache.commons.io.input.NullReader;
 import org.apache.commons.io.output.ByteArrayOutputStream;
@@ -62,14 +58,6 @@
 
     private byte[] inData = generateTestData(FILE_SIZE);
 
-    public static void main(String[] args) {
-        TestRunner.run(suite());
-    }
-
-    public static Test suite() {
-        return new TestSuite(IOUtilsCopyTestCase.class);
-    }
-
     public IOUtilsCopyTestCase(String testName) {
         super(testName);
     }

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/IOUtilsWriteTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/IOUtilsWriteTestCase.java?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/IOUtilsWriteTestCase.java (original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/IOUtilsWriteTestCase.java Fri Mar
 5 16:31:43 2010
@@ -22,10 +22,6 @@
 import java.util.Arrays;
 import java.util.List;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
 import org.apache.commons.io.output.ByteArrayOutputStream;
 import org.apache.commons.io.testtools.FileBasedTestCase;
 import org.apache.commons.io.testtools.YellOnFlushAndCloseOutputStream;
@@ -47,14 +43,6 @@
 
     private byte[] inData = generateTestData(FILE_SIZE);
 
-    public static void main(String[] args) {
-        TestRunner.run(suite());
-    }
-
-    public static Test suite() {
-        return new TestSuite(IOUtilsWriteTestCase.class);
-    }
-
     public IOUtilsWriteTestCase(String testName) {
         super(testName);
     }

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/LineIteratorTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/LineIteratorTestCase.java?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/LineIteratorTestCase.java (original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/LineIteratorTestCase.java Fri Mar
 5 16:31:43 2010
@@ -25,10 +25,6 @@
 import java.util.List;
 import java.util.NoSuchElementException;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
 import org.apache.commons.io.testtools.FileBasedTestCase;
 
 /**
@@ -40,14 +36,6 @@
  */
 public class LineIteratorTestCase extends FileBasedTestCase {
 
-    public static void main(String[] args) {
-        TestRunner.run(suite());
-    }
-
-    public static Test suite() {
-        return new TestSuite(LineIteratorTestCase.class);
-    }
-
     public LineIteratorTestCase(String name) {
         super(name);
     }

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/CompositeFileComparatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/CompositeFileComparatorTest.java?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/CompositeFileComparatorTest.java
(original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/CompositeFileComparatorTest.java
Fri Mar  5 16:31:43 2010
@@ -21,34 +21,12 @@
 import java.util.Comparator;
 import java.util.List;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
 /**
  * Test case for {@link CompositeFileComparator}.
  */
 public class CompositeFileComparatorTest extends ComparatorAbstractTestCase {
 
     /**
-     * Run the test.
-     *
-     * @param args arguments
-     */
-    public static void main(String[] args) {
-        TestRunner.run(suite());
-    }
-
-    /**
-     * Create a test suite.
-     *
-     * @return The test suite
-     */
-    public static Test suite() {
-        return new TestSuite(CompositeFileComparatorTest.class);
-    }
-
-    /**
      * Construct a new test case with the specified name.
      *
      * @param name Name of the test

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/DefaultFileComparatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/DefaultFileComparatorTest.java?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/DefaultFileComparatorTest.java
(original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/DefaultFileComparatorTest.java
Fri Mar  5 16:31:43 2010
@@ -17,9 +17,6 @@
 package org.apache.commons.io.comparator;
 
 import java.io.File;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
 
 /**
  * Test case for {@link DefaultFileComparator}.
@@ -27,24 +24,6 @@
 public class DefaultFileComparatorTest extends ComparatorAbstractTestCase {
 
     /**
-     * Run the test.
-     *
-     * @param args arguments
-     */
-    public static void main(String[] args) {
-        TestRunner.run(suite());
-    }
-
-    /**
-     * Create a test suite.
-     *
-     * @return The test suite
-     */
-    public static Test suite() {
-        return new TestSuite(DefaultFileComparatorTest.class);
-    }
-
-    /**
      * Construct a new test case with the specified name.
      *
      * @param name Name of the test

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/DirectoryFileComparatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/DirectoryFileComparatorTest.java?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/DirectoryFileComparatorTest.java
(original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/DirectoryFileComparatorTest.java
Fri Mar  5 16:31:43 2010
@@ -18,34 +18,12 @@
 
 import java.io.File;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
 /**
  * Test case for {@link DirectoryFileComparator}.
  */
 public class DirectoryFileComparatorTest extends ComparatorAbstractTestCase {
 
     /**
-     * Run the test.
-     *
-     * @param args arguments
-     */
-    public static void main(String[] args) {
-        TestRunner.run(suite());
-    }
-
-    /**
-     * Create a test suite.
-     *
-     * @return The test suite
-     */
-    public static Test suite() {
-        return new TestSuite(DirectoryFileComparatorTest.class);
-    }
-
-    /**
      * Construct a new test case with the specified name.
      *
      * @param name Name of the test

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/ExtensionFileComparatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/ExtensionFileComparatorTest.java?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/ExtensionFileComparatorTest.java
(original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/ExtensionFileComparatorTest.java
Fri Mar  5 16:31:43 2010
@@ -17,9 +17,6 @@
 package org.apache.commons.io.comparator;
 
 import java.io.File;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
 
 /**
  * Test case for {@link ExtensionFileComparator}.
@@ -27,24 +24,6 @@
 public class ExtensionFileComparatorTest extends ComparatorAbstractTestCase {
 
     /**
-     * Run the test.
-     *
-     * @param args arguments
-     */
-    public static void main(String[] args) {
-        TestRunner.run(suite());
-    }
-
-    /**
-     * Create a test suite.
-     *
-     * @return The test suite
-     */
-    public static Test suite() {
-        return new TestSuite(ExtensionFileComparatorTest.class);
-    }
-
-    /**
      * Construct a new test case with the specified name.
      *
      * @param name Name of the test

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/LastModifiedFileComparatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/LastModifiedFileComparatorTest.java?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/LastModifiedFileComparatorTest.java
(original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/LastModifiedFileComparatorTest.java
Fri Mar  5 16:31:43 2010
@@ -17,9 +17,6 @@
 package org.apache.commons.io.comparator;
 
 import java.io.File;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
 
 /**
  * Test case for {@link LastModifiedFileComparator}.
@@ -27,24 +24,6 @@
 public class LastModifiedFileComparatorTest extends ComparatorAbstractTestCase {
 
     /**
-     * Run the test.
-     *
-     * @param args arguments
-     */
-    public static void main(String[] args) {
-        TestRunner.run(suite());
-    }
-
-    /**
-     * Create a test suite.
-     *
-     * @return The test suite
-     */
-    public static Test suite() {
-        return new TestSuite(LastModifiedFileComparatorTest.class);
-    }
-
-    /**
      * Construct a new test case with the specified name.
      *
      * @param name Name of the test

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/NameFileComparatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/NameFileComparatorTest.java?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/NameFileComparatorTest.java
(original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/NameFileComparatorTest.java
Fri Mar  5 16:31:43 2010
@@ -17,9 +17,6 @@
 package org.apache.commons.io.comparator;
 
 import java.io.File;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
 
 /**
  * Test case for {@link NameFileComparator}.
@@ -27,24 +24,6 @@
 public class NameFileComparatorTest extends ComparatorAbstractTestCase {
 
     /**
-     * Run the test.
-     *
-     * @param args arguments
-     */
-    public static void main(String[] args) {
-        TestRunner.run(suite());
-    }
-
-    /**
-     * Create a test suite.
-     *
-     * @return The test suite
-     */
-    public static Test suite() {
-        return new TestSuite(NameFileComparatorTest.class);
-    }
-
-    /**
      * Construct a new test case with the specified name.
      *
      * @param name Name of the test

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/PathFileComparatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/PathFileComparatorTest.java?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/PathFileComparatorTest.java
(original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/PathFileComparatorTest.java
Fri Mar  5 16:31:43 2010
@@ -17,9 +17,6 @@
 package org.apache.commons.io.comparator;
 
 import java.io.File;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
 
 /**
  * Test case for {@link PathFileComparator}.
@@ -27,24 +24,6 @@
 public class PathFileComparatorTest extends ComparatorAbstractTestCase {
 
     /**
-     * Run the test.
-     *
-     * @param args arguments
-     */
-    public static void main(String[] args) {
-        TestRunner.run(suite());
-    }
-
-    /**
-     * Create a test suite.
-     *
-     * @return The test suite
-     */
-    public static Test suite() {
-        return new TestSuite(PathFileComparatorTest.class);
-    }
-
-    /**
      * Construct a new test case with the specified name.
      *
      * @param name Name of the test

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/SizeFileComparatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/SizeFileComparatorTest.java?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/SizeFileComparatorTest.java
(original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/SizeFileComparatorTest.java
Fri Mar  5 16:31:43 2010
@@ -17,9 +17,6 @@
 package org.apache.commons.io.comparator;
 
 import java.io.File;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
 
 /**
  * Test case for {@link SizeFileComparator}.
@@ -32,24 +29,6 @@
     private File largerFile;
 
     /**
-     * Run the test.
-     *
-     * @param args arguments
-     */
-    public static void main(String[] args) {
-        TestRunner.run(suite());
-    }
-
-    /**
-     * Create a test suite.
-     *
-     * @return The test suite
-     */
-    public static Test suite() {
-        return new TestSuite(SizeFileComparatorTest.class);
-    }
-
-    /**
      * Construct a new test case with the specified name.
      *
      * @param name Name of the test

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/AndFileFilterTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/AndFileFilterTestCase.java?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/AndFileFilterTestCase.java
(original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/AndFileFilterTestCase.java
Fri Mar  5 16:31:43 2010
@@ -19,22 +19,11 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
 public class AndFileFilterTestCase extends ConditionalFileFilterAbstractTestCase {
   
   private static final String DEFAULT_WORKING_PATH = "./AndFileFilterTestCase/";
   private static final String WORKING_PATH_NAME_PROPERTY_KEY = AndFileFilterTestCase.class.getName()
+ ".workingDirectory";
   
-  public static void main(final String[] args) {
-    TestRunner.run(suite());
-  }
-  
-  public static TestSuite suite() {
-    return new TestSuite(AndFileFilterTestCase.class);
-  }
-  
   private List<List<IOFileFilter>> testFilters;
   private List<boolean[]> testTrueResults;
   private List<boolean[]> testFalseResults;

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/FileFilterTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/FileFilterTestCase.java?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/FileFilterTestCase.java
(original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/FileFilterTestCase.java
Fri Mar  5 16:31:43 2010
@@ -24,9 +24,6 @@
 import java.util.Date;
 import java.util.List;
 
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOCase;
 import org.apache.commons.io.testtools.FileBasedTestCase;
@@ -47,14 +44,6 @@
         super(name);
     }
 
-    public static void main(String[] args) {
-        TestRunner.run(suite());
-    }
-
-    public static TestSuite suite() {
-        return new TestSuite(FileFilterTestCase.class);
-    }
-
     @Override
     public void setUp() {
         getTestDirectory().mkdirs();

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/OrFileFilterTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/OrFileFilterTestCase.java?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/OrFileFilterTestCase.java
(original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/OrFileFilterTestCase.java
Fri Mar  5 16:31:43 2010
@@ -19,22 +19,11 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
 public class OrFileFilterTestCase extends ConditionalFileFilterAbstractTestCase {
   
   private static final String DEFAULT_WORKING_PATH = "./OrFileFilterTestCase/";
   private static final String WORKING_PATH_NAME_PROPERTY_KEY = OrFileFilterTestCase.class.getName()
+ ".workingDirectory";
   
-  public static void main(final String[] args) {
-    TestRunner.run(suite());
-  }
-  
-  public static TestSuite suite() {
-    return new TestSuite(OrFileFilterTestCase.class);
-  }
-  
   private List<List<IOFileFilter>> testFilters;
   private List<boolean[]> testTrueResults;
   private List<boolean[]> testFalseResults;

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/RegexFileFilterTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/RegexFileFilterTestCase.java?rev=919474&r1=919473&r2=919474&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/RegexFileFilterTestCase.java
(original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/RegexFileFilterTestCase.java
Fri Mar  5 16:31:43 2010
@@ -19,9 +19,6 @@
 import java.io.File;
 import java.util.regex.Pattern;
 
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOCase;
 import org.apache.commons.io.testtools.FileBasedTestCase;
@@ -35,14 +32,6 @@
         super(name);
     }
 
-    public static void main(String[] args) {
-        TestRunner.run(suite());
-    }
-
-    public static TestSuite suite() {
-        return new TestSuite(RegexFileFilterTestCase.class);
-    }
-
     @Override
     public void setUp() {
         getTestDirectory().mkdirs();



Mime
View raw message