public class XMLParserTst
extends junit.framework.TestCase
Modifier and Type | Field and Description |
---|---|
static int |
NUM_PARSERS_IN_POOL
Number of parsers that are in the pool used by this test
|
static java.lang.String |
POOL_NAME
The name of the pool that this test uses to get XML Parsers
|
Constructor and Description |
---|
XMLParserTst(java.lang.String aName,
java.lang.String aXmlFile)
Create a new instance of the JUnit test XMLParserTst
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFileContents(java.lang.String aFilename)
Returns the contents of a file as a
String |
static void |
printResults(java.io.PrintWriter out,
java.lang.String uri,
long time,
int repetition)
Prints the results.
|
protected void |
setUp()
Setup the test
|
static junit.framework.Test |
suite()
DOCUMENT ME!
|
protected void |
tearDown()
Teardown the test
|
void |
testDomParser()
Tests that a non validating DOMParser instance from Xerces will return a
DOM Document
|
void |
testLockSchemaCache()
Future test
|
void |
testParsing()
Test using a parser from the pool with multiple threads.
|
void |
testSchemaNotFoundInClasspath()
Future test
|
void |
testSetNoSymbolTableSize()
Set the symbol table size to 0 and test parsing with an
XMLGrammarCachingConfiguration.
|
void |
testSetSymbolTableSize()
DOCUMENT ME!
|
void |
testTurnOffValidation()
Tests turning of the validation feature of the parser
|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
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, fail, fail
public static final java.lang.String POOL_NAME
public static final int NUM_PARSERS_IN_POOL
public XMLParserTst(java.lang.String aName, java.lang.String aXmlFile)
aName
- Name of testaXmlFile
- XML file to parsepublic static void printResults(java.io.PrintWriter out, java.lang.String uri, long time, int repetition)
out
- Where to print resultsuri
- Input filetime
- Time in millisecond to parserepetition
- How many times processedpublic void testTurnOffValidation()
public void testParsing()
public void testSetSymbolTableSize()
public void testSetNoSymbolTableSize()
public void testLockSchemaCache()
public void testSchemaNotFoundInClasspath()
public void testDomParser()
public static junit.framework.Test suite()
public java.lang.String getFileContents(java.lang.String aFilename)
String
aFilename
- File name to readString
if no error; empty string
otherwise.protected void setUp() throws java.lang.Exception
setUp
in class junit.framework.TestCase
java.lang.Exception
- Error with setupprotected void tearDown() throws java.lang.Exception
tearDown
in class junit.framework.TestCase
java.lang.Exception
- Error with teardown