Interface TestingClass


  • public interface TestingClass
    Used to identify any and all top-level testing classes which should be invoked in order to run the tests located in a '../test-classes/' directory.

    Example Test-Class Directory:
    The following lists the contents of the Java-HTML Library's test-files/ directory for the JSON-Package Torello.Java.JSON. Do note that the file-names for the following Test-Classes do not adhere to Java's stringent Package-Name and Directory-Name conventions. For the purposes this Testing-Feature of the Build-Package, a specialized Class-Loader (see: ByteArrClassLoader was built in order to abscond and divest itself from these stringent requirements. Any class that is has been placed insode of a directory or sub-directory of a Package's test-files/ directory will not heed the "expected" Package-Name for class (the one based on it's directory name), but rather will read the actual package directly from the Source-Code File. Please see the list of JSON Test Class's here:

    Torello.Java.JSON Tests

    Not every one of the classes listed in the above directory actually implements the TestingClass interface. Quite a few of the Test-Classes for the JSON-Package are part of a hierarchy, whereby a Top-Level Dispatch class invokes all of the "Sub-Tests." What is required is that any test which should be run - automatically - when invoking this class from using the CLI must be called from within a class which does implement the TestingClass.runTests method.

    In this Testing-Framework, there are two phases that may be invoked from the Command-Line Interface (CLI). The first is to invoke the Java-Compiler on all of the tests, and the second is to run all classes which have implemented the TestingClass
    See Also:
    Testing


    • Method Summary

       
      Mark a Class as a 'Testing-Class' by Implementing this Method.
      Modifier and Type Method
      boolean runTests​(StorageWriter sw)
    • Method Detail

      • runTests

          🗕  🗗  🗖
        boolean runTests​(StorageWriter sw)
                  throws java.io.IOException
        This method must be implemented in order for the Test-Suite Class-Builder to be able to identify which method should be invoked in order to run the tests
        Parameters:
        sw - This is used as a logging parameter.
        Returns:
        TRUE if all tests succeeded, and FALSE if a single test failed.
        Throws:
        java.io.IOException - This is allowed to throw. The StorageWriter class permits this excetion throw with many of its methods.