Package nu.xom.tests

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

See:

          Description

Class Summary
XOMTestCase Provides utility methods to compare nodes for deep equality in an infoset sense.
 

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-2010 Elliotte Rusty Harold

elharo@ibiblio.org