Package Torello.Java.Build
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'stest-files/
directory for the JSON-PackageTorello.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'stest-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 theTestingClass
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 theTestingClass.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 theTestingClass
- See Also:
Testing
Hi-Lited Source-Code:- View Here: Torello/Java/Build/TestingClass.java
- Open New Browser-Tab: Torello/Java/Build/TestingClass.java
File Size: 942 Bytes Line Count: 27 '\n' Characters Found
-
-
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, andFALSE
if a single test failed.- Throws:
java.io.IOException
- This is allowed to throw. TheStorageWriter
class permits this excetion throw with many of its methods.
-
-