|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--junit.framework.Assert
|
+--junit.framework.TestCase
|
+--xjavadoc.codeunit.CodeTestCase
CodeTestCase is a JUnit extension that will let you compare two sources (typically one we keep as test data and a generated one) on the API level or on the abstract syntax tree (AST) level. This is a lot more powerful than comparing on a character by character basis, because it's only "what matters" that is compared.
| Constructor Summary | |
CodeTestCase()
|
|
| Method Summary | |
void |
assertApiEquals(File expected,
File actual)
Asserts (tests) that the APIs of two sources are equal. |
void |
assertAstEquals(File expected,
File actual)
Asserts (tests) that the ASTs of two sources are equal. |
void |
assertEquals(File expected,
File actual)
Compares both API and AST. |
protected File |
getDir()
Returns the directory where this class is located, provided that it's not in a jar. |
protected File |
getRootDir()
Returns the root directory of the package hierarchy where this class is located, provided that it's not in a jar. |
| Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, 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 |
| Constructor Detail |
public CodeTestCase()
| Method Detail |
public void assertEquals(File expected,
File actual)
assertAstEquals(java.io.File, java.io.File)
and assertApiEquals(java.io.File, java.io.File).
expected - the expected sourceactual - the actual source
public void assertAstEquals(File expected,
File actual)
expected - the expected sourceactual - the actual source
public void assertApiEquals(File expected,
File actual)
expected - the expected sourceactual - the actual sourceprotected File getDir()
protected File getRootDir()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||