nu.xom.tests |
nu.xom.tests contains the JUnit
based test suite for XOM. JUnit 3.7 or later is required.
(Earlier versions don't have the assertTrue method
these tests depend on.)
The XOMTests class runs all the tests, except those that
take an exceptionally long time to run (MegaTest ).
Some of the tests, especially the builder tests,
depend on the underlying parser, and are known to fail
if the parser is buggy. Xerces 2.6.1 is the only parser which is currently
known to be able to run all the tests. Earlier versions of Xerces 2.x
cannot successfully run all the tests.
The IBM JVM 1.4.1 bundles an earlier version of Xerces which overrides the one bundled with XOM.
For this reason, a few tests will fail when using that VM. These tests should pass when using the
Sun VMs.
Similarly some of the XSLT tests depend on the
underlying TrAX engine. Xalan 2.7 and Saxon 6.5.4 both do a pretty good job,
but neither can pass all thne tests included with XOM.
testOASISMicrosoftConformanceSuite
is the most likely test to fail.
A few tests rely on access to external network resources,
and may fail sproadically if the remote server is down or unreachable.
However, in general, they pass.
The only other test in this class which is known to fail is
testBuildFromFileThatContainsPlane1CharacterInName. This test fails on Mac OS X due to bugs in that platform's VM. However, it passes on other platforms.
There are numerous public classes and methods in this package because JUnit requires
all test cases to be public. However, the only published class is
XOMTestCase which provides methods for asserting the equality
of documents, elements, processing instructions, and other node types.
This may be useful for your own tests. The remainder of this package
should be treated as unstable and your code should not depend on it.
@since 1.0
|
Java Source File Name | Type | Comment |
AttributesTest.java | Class |
This class provides unit tests for the
Attributes class. |
AttributeTest.java | Class |
Basic tests for the Attribute class. |
AttributeTypeTest.java | Class |
Tests for the Attribute.Type inner class. |
BaseURITest.java | Class |
Tests the getting and setting of base URI information
on nodes. |
BuilderTest.java | Class |
Tests building documents from streams, strings, files,
and other input sources. |
CanonicalizationExceptionTest.java | Class |
Unit tests for the CanonicalizationException class. |
CanonicalizerTest.java | Class |
Tests canonicalization. |
CDATASectionTest.java | Class |
Test that CDATA sections are read and where possible
preserved upon serialization. |
CommentTest.java | Class |
Various basic unit tests for the Comment class. |
DocTypeTest.java | Class |
Various tests for the DocType class. |
DocumentTest.java | Class |
Various basic tests for the Document class. |
DOMConverterTest.java | Class |
Basic tests for conversion from DOM trees to XOM trees
and back again. |
EBCDICTest.java | Class |
Tests support for the typical U.S. |
ElementTest.java | Class |
Tests for the Element class. |
EncodingTest.java | Class |
Check serialization of almost all of Unicode
in a variety of encodings. |
FastTests.java | Class |
Collect the faster of XOM's test cases into a single class.
This is a faster first check on sanity. |
IDTest.java | Class |
Tests for xml:id attributes. |
InfoTest.java | Class |
Test the main() method for the JAR file. |
LeafNodeTest.java | Class | |
MegaTest.java | Class |
Test that XOM can handle really big files. |
NamespaceNodeTest.java | Class | |
NamespacesTest.java | Class |
Tests that namespace well-formedness is maintained. |
NodeFactoryTest.java | Class |
Tests that subclasses of NodeFactory can filter
on building in various ways. |
NodesTest.java | Class |
Various basic tests for the Nodes class. |
ParentNodeTest.java | Class |
Tests adding, removing, and counting children from parent nodes. |
ParsingExceptionTest.java | Class |
Unit tests for the ParsingException class. |
ProcessingInstructionTest.java | Class |
Unit tests for the ProcessingInstruction class. |
RoundTripTest.java | Class |
This mostly verifies that white space
is properly escaped on output. |
SAXConverterTest.java | Class |
Basic tests for conversion from XOM trees
to SAX ContentHandlers. |
SerializerTest.java | Class |
Tests for Serializer functionality. |
SubclassTest.java | Class |
Tests for subclasses of XOM classes. |
TextTest.java | Class |
Basic tests for the Text class. |
ValidityExceptionTest.java | Class |
Unit tests for the ValidityException class. |
VerifierTest.java | Class |
Tests to make sure name and character rules are enforced.
The rules are tested by comparison with the rules in
the org.apache.xerces.util.XMLChar class.
This is an undocumented class so this is potentially dangerous
in the long run. |
XIncludeExceptionTest.java | Class |
Unit tests for the XIncludeException class. |
XIncludeTest.java | Class |
Unit tests for the XInclude and XPointer engines. |
XMLExceptionTest.java | Class |
This class provides unit tests for the XMLException
class. |
XMLWriter.java | Class |
The original version of this class was written and placed in the
public domain by David Megginson. |
XOMTestCase.java | Class |
Provides utility methods to compare nodes for deep equality in an
infoset sense. |
XOMTestCaseTest.java | Class |
Unit tests for XOMTestCase. |
XOMTests.java | Class |
Collect most of XOM's test cases into a single class,
excepting those tests that are insanely expensive or
that fail due to Java bugs. |
XPathExceptionTest.java | Class |
Unit tests for the XPathException class. |
XPathTest.java | Class | |
XSLExceptionTest.java | Class |
Unit tests for the XSLException class. |
XSLTransformTest.java | Class |
Unit tests for the XSLT engine. |