net.sf.farrago.test
Class DiffSanityTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.eigenbase.test.DiffTestCase
              extended by net.sf.farrago.test.DiffSanityTest
All Implemented Interfaces:
Test

public class DiffSanityTest
extends DiffTestCase

DiffSanityTest verifies that the facilities in DiffTestCase are actually working and not just happily rubber-stamping away.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/test/DiffSanityTest.java#9 $
Author:
John V. Sichi

Field Summary
 
Fields inherited from class org.eigenbase.test.DiffTestCase
logFile, logOutputStream, refFile
 
Constructor Summary
DiffSanityTest(String testName)
           
 
Method Summary
protected  File getTestlogRoot()
           
 void testDiff()
          Negative test.
 void testJavaAssert()
          This is here to verify that Java assert is correctly enabled during testing.
 void testMissingRefFile()
          Negative test.
 void testNoDiff()
          Positive test.
 
Methods inherited from class org.eigenbase.test.DiffTestCase
addDiffMask, addIgnorePattern, diffFile, diffLines, diffTestLog, fileContents, openTestLog, openTestLogOutputStream, setGC, setRefFileDiffMasks, setUp, setVerbose, tearDown
 
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, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DiffSanityTest

public DiffSanityTest(String testName)
               throws Exception
Throws:
Exception
Method Detail

getTestlogRoot

protected File getTestlogRoot()
                       throws Exception
Specified by:
getTestlogRoot in class DiffTestCase
Returns:
the root under which testlogs should be written
Throws:
Exception

testDiff

public void testDiff()
              throws Exception
Negative test. I checked in a mismatching .ref file to make sure the diff gets detected.

Throws:
Exception

testMissingRefFile

public void testMissingRefFile()
                        throws Exception
Negative test. Purposefully do NOT create a .ref file, and make sure its absence gets detected.

Throws:
Exception

testNoDiff

public void testNoDiff()
                throws Exception
Positive test. The .ref file is good.

Throws:
Exception

testJavaAssert

public void testJavaAssert()
This is here to verify that Java assert is correctly enabled during testing.