| de.susebox.jtopas.TestEmbeddedTokenizer
TestEmbeddedTokenizer | public class TestEmbeddedTokenizer extends TestCase (Code) | |
This unit test checks the embedded-tokenizer feature of the class
StandardTokenizer .
With this technique it is possible to parse multipart documents like HTML with
embedded CSS and script parts, Java and javadoc comments etc.
This test suite works with a test configuration file. This file contains some
sets of properties, each set for one or more different test runs.
The properties are defined as class constants. In the configuration file, a
property consists of the property name and a number identifying the property
set.
See Also: StandardTokenizer author: Heiko Blau |
Method Summary | |
public static void | main(String[] args) call this method to invoke the tests. | protected void | setUp() Sets up the fixture, for example, open a network connection. | public static Test | suite() Implementation of the JUnit method suite . | protected void | tearDown() Tears down the fixture, for example, close a network connection. | public void | testEmbeddedTokenizer() The method takes the HTML file given in the constructor, and parses with
the main HTML tokenizer and two embedded tokenizers for JavaScript and
CSS. | public void | testJavaTokenizer() This method reads the given stream as a Java source. |
TestEmbeddedTokenizer | public TestEmbeddedTokenizer(String test, String path)(Code) | | Initializing the instance with the test file path
Parameters: test - which test method should be invoked Parameters: path - name of test configuration file |
main | public static void main(String[] args)(Code) | | call this method to invoke the tests.
Parameters: args - unused |
setUp | protected void setUp() throws Exception(Code) | | Sets up the fixture, for example, open a network connection.
This method is called before a test is executed.
throws: Exception - for anything that might go wrong |
suite | public static Test suite()(Code) | | Implementation of the JUnit method suite . For each set of test
properties one or more tests are instantiated.
a test suite |
tearDown | protected void tearDown() throws Exception(Code) | | Tears down the fixture, for example, close a network connection.
This method is called after a test is executed.
throws: Exception - for anything that might go wrong |
testJavaTokenizer | public void testJavaTokenizer() throws Throwable(Code) | | This method reads the given stream as a Java source. It extracts javadoc
comments and source code.
There should be a class or interface name in every Java source. The opening
and closing brackets should match etc.
throws: Throwable - for anything that might go wrong See Also: TestEmbeddedTokenizer.testEmbeddedTokenizer |
|
|