Class SigTest
java.lang.Object
com.sun.ts.tests.el.signaturetest.SigTest
- Direct Known Subclasses:
ELSigTestIT
This class should be extended by TCK developers that wish to create a set of
signature tests that run outside of any Java EE container. Developers must
implement the getPackages method to specify which packages are to be tested
by the signature test framework.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanup()
Called by the test framework to cleanup any outstanding state.protected String[]
Returns an array of individual classes that must be tested by the signature test framwork.protected abstract String[]
Returns the list of packages that must be tested by the siganture test framework.protected SignatureTestDriver
Returns aSignatureTestDriver
appropriate for the particular TCK (using API check or the Signature Test Framework).void
setup()
Called by the test framework to initialize this test.void
signatureTest
(String mapFile, String packageFile, Properties mapFileAsProps, String[] packages) Called by the test framework to run this test.writeStreamToSigFile
(InputStream inputStream, String apiPackage, String packageVersion) writeStreamToTempFile
(InputStream inputStream, String tempFilePrefix, String tempFileSuffix)
-
Field Details
-
driver
-
testInfo
-
-
Constructor Details
-
SigTest
public SigTest()
-
-
Method Details
-
getSigTestDriver
Returns a
SignatureTestDriver
appropriate for the particular TCK (using API check or the Signature Test Framework).The default implementation of this method will return a
SignatureTestDriver
that will use API Check. TCK developers can override this to return the desiredSignatureTestDriver
for their TCK. -
getPackages
Returns the list of packages that must be tested by the siganture test framework. TCK developers must implement this method in their signature test sub-class.- Returns:
- String A list of packages that the developer wishes to test using the signature test framework.
-
getClasses
Returns an array of individual classes that must be tested by the signature test framwork. TCK developers may override this method when this functionality is needed. Most will only need package level granularity.- Returns:
- an Array of Strings containing the individual classes the framework should test. The default implementation of this method returns a zero-length array.
-
setup
public void setup()Called by the test framework to initialize this test. The method simply retrieves some state information that is necessary to run the test when when the test framework invokes the run method (actually the test1 method). -
signatureTest
public void signatureTest(String mapFile, String packageFile, Properties mapFileAsProps, String[] packages) throws Exception Called by the test framework to run this test. This method utilizes the state information set in the setup method to run the signature tests. All signature test code resides in the utility class so it can be reused by the signature test framework base classes.- Throws:
Exception
- When an error occurs executing the signature tests.
-
writeStreamToTempFile
public File writeStreamToTempFile(InputStream inputStream, String tempFilePrefix, String tempFileSuffix) throws IOException - Throws:
IOException
-
writeStreamToSigFile
public File writeStreamToSigFile(InputStream inputStream, String apiPackage, String packageVersion) throws IOException - Throws:
IOException
-
cleanup
public void cleanup()Called by the test framework to cleanup any outstanding state.
-