Package nu.xom.tests

nu.xom.tests contains the JUnit based test suite for XOM.

See:
          Description

Class Summary
AttributesTest This class provides unit tests for the Attributes class.
AttributeTest Basic tests for the Attribute class.
AttributeTypeTest Tests for the Attribute.Type inner class.
BaseURITest Tests the getting and setting of base URI information on nodes.
BuilderTest Tests building documents from streams, strings, files, and other input sources.
CanonicalizationExceptionTest Unit tests for the CanonicalizationException class.
CanonicalizerTest Tests canonicalization.
CDATASectionTest Test that CDATA sections are read and where possible preserved upon serialization.
CommentTest Various basic unit tests for the Comment class.
DocTypeTest Various tests for the DocType class.
DocumentTest Various basic tests for the Document class.
DOMConverterTest Basic tests for conversion from DOM trees to XOM trees and back again.
EBCDICTest Tests support for the typical U.S.
ElementTest Tests for the Element class.
EncodingTest Check serialization of almost all of Unicode in a variety of encodings.
FastTests Collect the faster of XOM's test cases into a single class.
IDTest Tests for xml:id attributes.
InfoTest Test the main() method for the JAR file.
LeafNodeTest
MegaTest Test that XOM can handle really big files.
NamespaceNodeTest Tests for namespace nodes used in XPath
NamespacesTest Tests that namespace well-formedness is maintained.
NodeFactoryTest Tests that subclasses of NodeFactory can filter on building in various ways.
NodesTest Various basic tests for the Nodes class.
ParentNodeTest Tests adding, removing, and counting children from parent nodes.
ParsingExceptionTest Unit tests for the ParsingException class.
ProcessingInstructionTest Unit tests for the ProcessingInstruction class.
RoundTripTest This mostly verifies that white space is properly escaped on output.
SAXConverterTest Basic tests for conversion from XOM trees to SAX ContentHandlers.
SerializerTest Tests for Serializer functionality.
SubclassTest Tests for subclasses of XOM classes.
TextTest Basic tests for the Text class.
ValidityExceptionTest Unit tests for the ValidityException class.
VerifierTest Tests to make sure name and character rules are enforced.
XIncludeExceptionTest Unit tests for the XIncludeException class.
XIncludeTest Unit tests for the XInclude and XPointer engines.
XMLExceptionTest This class provides unit tests for the XMLException class.
XOMTestCase Provides utility methods to compare nodes for deep equality in an infoset sense.
XOMTestCaseTest Unit tests for XOMTestCase.
XOMTests 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 Unit tests for the XPathException class.
XPathTest Unit tests for XPath functionality
XSLExceptionTest Unit tests for the XSLException class.
XSLTransformTest Unit tests for the XSLT engine.
 

Package nu.xom.tests Description

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


Copyright 2002-2005 Elliotte Rusty Harold
elharo@metalab.unc.edu