Java Doc for XOMTestCase.java in  » XML » xom » nu » xom » tests » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » XML » xom » nu.xom.tests 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


nu.xom.tests.XOMTestCase

All known Subclasses:   nu.xom.tests.SubclassTest,  nu.xom.tests.XSLTransformTest,  nu.xom.tests.ValidityExceptionTest,  nu.xom.tests.XPathTest,  nu.xom.tests.MegaTest,  nu.xom.tests.TextTest,  nu.xom.tests.AttributeTest,  nu.xom.tests.LeafNodeTest,  nu.xom.tests.NodeFactoryTest,  nu.xom.tests.XSLExceptionTest,  nu.xom.tests.XIncludeExceptionTest,  nu.xom.tests.DocumentTest,  nu.xom.tests.AttributeTypeTest,  nu.xom.tests.DOMConverterTest,  nu.xom.tests.CanonicalizerTest,  nu.xom.tests.InfoTest,  nu.xom.tests.BaseURITest,  nu.xom.tests.EncodingTest,  nu.xom.tests.RoundTripTest,  nu.xom.tests.ParentNodeTest,  nu.xom.tests.NamespacesTest,  nu.xom.tests.CDATASectionTest,  nu.xom.tests.XIncludeTest,  nu.xom.tests.ProcessingInstructionTest,  nu.xom.tests.SAXConverterTest,  nu.xom.tests.IDTest,  nu.xom.tests.XMLExceptionTest,  nu.xom.tests.SerializerTest,  nu.xom.tests.ElementTest,  nu.xom.tests.NodesTest,  nu.xom.tests.DocTypeTest,  nu.xom.tests.EBCDICTest,  nu.xom.tests.AttributesTest,  nu.xom.tests.CanonicalizationExceptionTest,  nu.xom.tests.ParsingExceptionTest,  nu.xom.tests.XPathExceptionTest,  nu.xom.tests.NamespaceNodeTest,  nu.xom.tests.XOMTestCaseTest,  nu.xom.tests.VerifierTest,  nu.xom.tests.BuilderTest,  nu.xom.tests.CommentTest,
XOMTestCase
public class XOMTestCase extends TestCase (Code)

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


author:
   Elliotte Rusty Harold
version:
   1.1a2



Constructor Summary
public  XOMTestCase(String name)
    

Create a new XOMTestCase with the specified name.


Method Summary
public static  voidassertEquals(Text expected, Text actual)
    

Asserts that two text nodes are equal.

public static  voidassertEquals(String message, Text expected, Text actual)
    

Asserts that two text nodes are equal.

public static  voidassertEquals(Attribute expected, Attribute actual)
    

Asserts that two attribute nodes are equal.

public static  voidassertEquals(String message, Attribute expected, Attribute actual)
    

Asserts that two attribute nodes are equal.

public static  voidassertEquals(DocType expected, DocType actual)
    

Asserts that two DocType nodes are equal.

public static  voidassertEquals(String message, DocType expected, DocType actual)
    

Asserts that two DocType nodes are equal.

public static  voidassertEquals(Element expected, Element actual)
    

Asserts that two element nodes are equal.

public static  voidassertEquals(String message, Element expected, Element actual)
    

Asserts that two element nodes are equal.

public static  voidassertEquals(Document expected, Document actual)
    

Asserts that two document nodes are equal.

public static  voidassertEquals(String message, Document expected, Document actual)
    

Asserts that two document nodes are equal.

public static  voidassertEquals(Comment expected, Comment actual)
    

Asserts that two comment nodes are equal.

public static  voidassertEquals(String message, Comment expected, Comment actual)
    

Asserts that two comment nodes are equal.

public static  voidassertEquals(ProcessingInstruction expected, ProcessingInstruction actual)
    

Asserts that two processing instruction nodes are equal. Processing instruction nodes are considered equal if they have the same target and the same value.

public static  voidassertEquals(String message, ProcessingInstruction expected, ProcessingInstruction actual)
    

Asserts that two processing instruction nodes are equal. Processing instruction nodes are considered equal if they have the same target and the same value.

public static  voidassertEquals(String message, Namespace expected, Namespace actual)
    

Asserts that two namespace nodes are equal. Namespace nodes are considered equal if they have the same prefix and the same URI.

public static  voidassertEquals(Node expected, Node actual)
    

Asserts that two nodes are equal.

public static  voidassertEquals(String message, Node expected, Node actual)
    

Asserts that two nodes are equal.



Constructor Detail
XOMTestCase
public XOMTestCase(String name)(Code)

Create a new XOMTestCase with the specified name.





Method Detail
assertEquals
public static void assertEquals(Text expected, Text actual)(Code)

Asserts that two text nodes are equal. Text nodes are considered equal if they are identical char by char, or if both are null. Unicode and whitespace normalization is not performed before comparison. If the two nodes are not equal, a ComparisonFailure is thrown.


Parameters:
  expected - the text the test should produce
Parameters:
  actual - the text the test does produce
throws:
  ComparisonFailure - if the text nodes are not equal



assertEquals
public static void assertEquals(String message, Text expected, Text actual)(Code)

Asserts that two text nodes are equal. Text nodes are considered equal if they are identical char by char, or if both are null. Unicode and whitespace normalization is not performed before comparison. If the two nodes are not equal, a ComparisonFailure is thrown with the given message.


Parameters:
  message - printed if the texts are not equal
Parameters:
  expected - the text the test should produce
Parameters:
  actual - the text the test does produce
throws:
  ComparisonFailure - if the text nodes are not equal



assertEquals
public static void assertEquals(Attribute expected, Attribute actual)(Code)

Asserts that two attribute nodes are equal. Attribute nodes are considered equal if their qualified names, namespace URIs, and values are equal. The type is not considered because it tends not to survive a roundtrip. If the two nodes are not equal, a ComparisonFailure is thrown.

There is special handling for the xml:base attribute. In order to facilitate comparison between relative and absolute URIs, two xml:base attributes are considered equal if one might be a relative form of the other.


Parameters:
  expected - the attribute the test should produce
Parameters:
  actual - the attribute the test does produce
throws:
  ComparisonFailure - if the sttributes are not equal



assertEquals
public static void assertEquals(String message, Attribute expected, Attribute actual)(Code)

Asserts that two attribute nodes are equal. Attribute nodes are considered equal if their qualified names, namespace URIs, and values are equal. The type is not considered because this tends not to survive a roundtrip. If the two nodes are not equal, a ComparisonFailure is thrown with the given message.

There is special handling for the xml:base attribute. In order to facilitate comparison between relative and absolute URIs, two xml:base attributes are considered equal if one might be a relative form of the other.


Parameters:
  message - printed if the attributes are not equal
Parameters:
  expected - the attribute the test should produce
Parameters:
  actual - the attribute the test does produce
throws:
  ComparisonFailure - if the attributes are not equal



assertEquals
public static void assertEquals(DocType expected, DocType actual)(Code)

Asserts that two DocType nodes are equal. DocType nodes are considered equal if their root element names, public IDs, and system IDs are equal. The internal DTD subsets are not considered. If the two nodes are not equal, a ComparisonFailure is thrown.


Parameters:
  expected - the DOCTYPE declaration the test should produce
Parameters:
  actual - the DOCTYPE declaration the test does produce
throws:
  ComparisonFailure - if the document type declarations are not equal



assertEquals
public static void assertEquals(String message, DocType expected, DocType actual)(Code)

Asserts that two DocType nodes are equal. DocType nodes are considered equal if their root element name, public ID, and system ID are equal. The internal DTD subsets are not considered. If the two nodes are not equal, a ComparisonFailure is thrown with the given message.


Parameters:
  message - printed if the DOCTYPE declarations are not equal
Parameters:
  expected - the DOCTYPE declaration the test should produce
Parameters:
  actual - the DOCTYPE declaration the test does produce
throws:
  ComparisonFailure - if the document type declarations are not equal



assertEquals
public static void assertEquals(Element expected, Element actual)(Code)

Asserts that two element nodes are equal. Element nodes are considered equal if their qualified names, namespace URI, attributes, declared namespaces, and children are equal. Consecutive text node children are coalesced before the comparison is made. If the two nodes are not equal, a ComparisonFailure is thrown.


Parameters:
  expected - the element the test should produce
Parameters:
  actual - the element the test does produce
throws:
  ComparisonFailure - if the elements are not equal



assertEquals
public static void assertEquals(String message, Element expected, Element actual)(Code)

Asserts that two element nodes are equal. Element nodes are considered equal if their qualified names, namespace URI, attributes, declared namespaces, and children are equal. Consecutive text node children are coalesced before the comparison is made. If the two nodes are not equal, a ComparisonFailure is thrown with the given message.


Parameters:
  message - printed if the elements are not equal
Parameters:
  expected - the element the test should produce
Parameters:
  actual - the element the test does produce
throws:
  ComparisonFailure - if the elements are not equal



assertEquals
public static void assertEquals(Document expected, Document actual)(Code)

Asserts that two document nodes are equal. Document nodes are considered equal if their children are equal. If the two nodes are not equal, a ComparisonFailure is thrown.


Parameters:
  expected - the document the test should produce
Parameters:
  actual - the document the test does produce
throws:
  ComparisonFailure - if the documents are not equal



assertEquals
public static void assertEquals(String message, Document expected, Document actual)(Code)

Asserts that two document nodes are equal. Document nodes are considered equal if their children are equal. If the two nodes are not equal, a ComparisonFailure is thrown with the given message.


Parameters:
  message - printed if the documents are not equal
Parameters:
  expected - the document the test should produce
Parameters:
  actual - the document the test does produce
throws:
  ComparisonFailure - if the documents are not equal



assertEquals
public static void assertEquals(Comment expected, Comment actual)(Code)

Asserts that two comment nodes are equal. Comment nodes are considered equal if they are identical char by char, or if both are null. Unicode and whitespace normalization is not performed before comparison. If the two nodes are not equal, a ComparisonFailure is thrown.


Parameters:
  expected - the comment the test should produce
Parameters:
  actual - the comment the test does produce
throws:
  ComparisonFailure - if the comments are not equal



assertEquals
public static void assertEquals(String message, Comment expected, Comment actual)(Code)

Asserts that two comment nodes are equal. Comment nodes are considered equal if they are identical char by char, or if both are null. Unicode and whitespace normalization is not performed before comparison. If the two nodes are not equal, a ComparisonFailure is thrown with the given message.


Parameters:
  message - printed if the comments are not equal
Parameters:
  expected - the comment the test should produce
Parameters:
  actual - the comment the test does produce
throws:
  ComparisonFailure - if the comments are not equal



assertEquals
public static void assertEquals(ProcessingInstruction expected, ProcessingInstruction actual)(Code)

Asserts that two processing instruction nodes are equal. Processing instruction nodes are considered equal if they have the same target and the same value. If the two nodes are not equal, a ComparisonFailure is thrown.


Parameters:
  expected - the processing instruction the test should produce
Parameters:
  actual - the processing instruction the test does produce
throws:
  ComparisonFailure - if the processing instructions are not equal



assertEquals
public static void assertEquals(String message, ProcessingInstruction expected, ProcessingInstruction actual)(Code)

Asserts that two processing instruction nodes are equal. Processing instruction nodes are considered equal if they have the same target and the same value. If the two nodes are not equal, a ComparisonFailure is thrown with the given message.


Parameters:
  message - printed if the processing instructions are not equal
Parameters:
  expected - the processing instruction the test should produce
Parameters:
  actual - the processing instruction the test does produce
throws:
  ComparisonFailure - if the processing instructions are not equal



assertEquals
public static void assertEquals(String message, Namespace expected, Namespace actual)(Code)

Asserts that two namespace nodes are equal. Namespace nodes are considered equal if they have the same prefix and the same URI. If the two nodes are not equal, a ComparisonFailure is thrown with the given message.


Parameters:
  message - printed if the namespaces are not equal
Parameters:
  expected - the namespace the test should produce
Parameters:
  actual - the namespace the test does produce
throws:
  ComparisonFailure - if the namespaces are not equal



assertEquals
public static void assertEquals(Node expected, Node actual)(Code)

Asserts that two nodes are equal. If the two nodes are not equal a ComparisonFailure is thrown. The subclass is not considered. The basic XOM class is considered, but the subclass is not. For example, a Text object can be equal to an object that is an HTMLText, but it can never be equal to a Comment.


Parameters:
  expected - the node the test should produce
Parameters:
  actual - the node the test does produce
throws:
  ComparisonFailure - if the nodes are not equal



assertEquals
public static void assertEquals(String message, Node expected, Node actual)(Code)

Asserts that two nodes are equal. If the two nodes are not equal a ComparisonFailure is thrown with the given message. The subclass is not considered. The basic XOM class is considered, but the subclass is not. For example, a Text object can be equal to an an HTMLText object, but it can never be equal to a Comment.


Parameters:
  message - printed if the nodes are not equal
Parameters:
  expected - the node the test should produce
Parameters:
  actual - the node the test does produce
throws:
  ComparisonFailure - if the nodes are not equal



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.