APITestCase
Date: 2017-03-29

com.thoughtworks.qdox.junit

## Class APITestCase

- java.lang.Object
- - junit.framework.Assert
  - - junit.framework.TestCase
    - - com.thoughtworks.qdox.junit.APITestCase

- All Implemented Interfaces:
    junit.framework.Test

      public abstract class APITestCase
      extends junit.framework.TestCase

  APITestCase is a JUnit extension that will let you compare two sources (typically one kept as a static expected result and a generated one) on the API level.

  This class has been ported from XJavaDoc's CodeTestCase, carrying over only the parts that compare on the API level. The original CodeTestCase also has comparison of Java source AST (Abstract Syntax Trees). This will probably be extracted into a ASTTestCase class and hosted as a separate project somewhere else. It should probably be based on JavaCC for ease of porting.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `APITestCase()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `assertApiEquals(java.net.URL expected, java.net.URL actual)` Compares API of both sources in the readers.
    `protected java.io.File` | `getDir()`
    `protected java.io.File` | `getRootDir()`

    - ### Methods inherited from class junit.framework.TestCase

      `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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### APITestCase

          public APITestCase()

  - ### Method Detail

    - #### assertApiEquals

          public static void assertApiEquals(java.net.URL expected,
                             java.net.URL actual)
                                      throws java.io.IOException

      Compares API of both sources in the readers.

      Note: This method is for backward naming compatiblity with xjavadoc.codeunit.CodeTestCase.

      Parameters:
        `expected` - the expected source
        `actual` - the actual source
      Throws:
        `java.io.IOException`

    - #### getDir

          protected java.io.File getDir()

    - #### getRootDir

          protected java.io.File getRootDir()