org.apache.commons.io.comparator
Class ComparatorAbstractTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.commons.io.testtools.FileBasedTestCase
              extended by org.apache.commons.io.comparator.ComparatorAbstractTestCase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
DefaultFileComparatorTest, ExtensionFileComparatorTest, LastModifiedFileComparatorTest, NameFileComparatorTest, PathFileComparatorTest, SizeFileComparatorTest

public abstract class ComparatorAbstractTestCase
extends FileBasedTestCase

Base Test case for Comparator implementations.


Field Summary
protected  java.util.Comparator comparator
          comparator instance
protected  java.io.File equalFile1
          File which compares equal to "equalFile2"
protected  java.io.File equalFile2
          File which compares equal to "equalFile1"
protected  java.io.File lessFile
          File which is less than the "moreFile"
protected  java.io.File moreFile
          File which is more than the "lessFile"
protected  java.util.Comparator reverse
          reverse comparator instance
 
Constructor Summary
ComparatorAbstractTestCase(java.lang.String name)
          Construct a new test case with the specified name
 
Method Summary
protected  void setUp()
           
protected  void tearDown()
           
 void testComparator()
          Test the comparator.
 void testReverseComparator()
          Test the comparator reversed.
 
Methods inherited from class org.apache.commons.io.testtools.FileBasedTestCase
assertEqualContent, assertEqualContent, checkFile, checkWrite, checkWrite, createFile, createLineBasedFile, deleteFile, generateTestData, generateTestData, getTestDirectory, newFile
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

comparator

protected java.util.Comparator comparator
comparator instance


reverse

protected java.util.Comparator reverse
reverse comparator instance


equalFile1

protected java.io.File equalFile1
File which compares equal to "equalFile2"


equalFile2

protected java.io.File equalFile2
File which compares equal to "equalFile1"


lessFile

protected java.io.File lessFile
File which is less than the "moreFile"


moreFile

protected java.io.File moreFile
File which is more than the "lessFile"

Constructor Detail

ComparatorAbstractTestCase

public ComparatorAbstractTestCase(java.lang.String name)
Construct a new test case with the specified name

Parameters:
name - Name of the test
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception
See Also:
TestCase.setUp()

tearDown

protected void tearDown()
                 throws java.lang.Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
java.lang.Exception
See Also:
TestCase.tearDown()

testComparator

public void testComparator()
Test the comparator.


testReverseComparator

public void testReverseComparator()
Test the comparator reversed.



Copyright © 2002-2008 The Apache Software Foundation. All Rights Reserved.