testunitxml 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. data/docs/html/classes/REXML.html +111 -0
  2. data/docs/html/classes/REXML/Attributes.html +151 -0
  3. data/docs/html/classes/REXML/Attributes.src/M000001.html +24 -0
  4. data/docs/html/classes/Test.html +131 -0
  5. data/docs/html/classes/Test/Unit.html +124 -0
  6. data/docs/html/classes/Test/Unit/TestCase.html +125 -0
  7. data/docs/html/classes/Test/Unit/XML.html +237 -0
  8. data/docs/html/classes/Test/Unit/XML.src/M000002.html +23 -0
  9. data/docs/html/classes/Test/Unit/XML/NodeIterator.html +195 -0
  10. data/docs/html/classes/Test/Unit/XML/NodeIterator.src/M000003.html +27 -0
  11. data/docs/html/classes/Test/Unit/XML/NodeIterator.src/M000004.html +19 -0
  12. data/docs/html/classes/Test/Unit/XML/NodeIterator.src/M000005.html +18 -0
  13. data/docs/html/classes/Test/Unit/XML/NodeIterator.src/M000006.html +20 -0
  14. data/docs/html/classes/Test/Unit/XML/NodeIterator/NullNodeFilter.html +137 -0
  15. data/docs/html/classes/Test/Unit/XML/NodeIterator/NullNodeFilter.src/M000007.html +18 -0
  16. data/docs/html/classes/Test/Unit/XML/XmlEqualFilter.html +144 -0
  17. data/docs/html/classes/Test/Unit/XML/XmlEqualFilter.src/M000008.html +23 -0
  18. data/docs/html/created.rid +1 -0
  19. data/docs/html/files/MIT-LICENSE.html +130 -0
  20. data/docs/html/files/README.html +226 -0
  21. data/docs/html/files/lib/test/unit/xml/attributes_mixin_rb.html +101 -0
  22. data/docs/html/files/lib/test/unit/xml/nodeiterator_rb.html +101 -0
  23. data/docs/html/files/lib/test/unit/xml/xml_assertions_rb.html +112 -0
  24. data/docs/html/files/lib/test/unit/xml/xmlequalfilter_rb.html +101 -0
  25. data/docs/html/files/lib/test/unit/xml_rb.html +120 -0
  26. data/docs/html/fr_class_index.html +35 -0
  27. data/docs/html/fr_file_index.html +33 -0
  28. data/docs/html/fr_method_index.html +34 -0
  29. data/docs/html/index.html +24 -0
  30. data/lib/test/unit/xml.rb +21 -0
  31. data/lib/test/unit/xml/attributes_mixin.rb +21 -0
  32. data/lib/test/unit/xml/nodeiterator.rb +61 -0
  33. data/lib/test/unit/xml/xml_assertions.rb +187 -0
  34. data/lib/test/unit/xml/xmlequalfilter.rb +27 -0
  35. data/test/data/test1.xml +23 -0
  36. data/test/tc_testunitxml.rb +123 -0
  37. metadata +101 -0
@@ -0,0 +1,226 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>File: README</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="fileHeader">
50
+ <h1>README</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>README
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Mon Jan 09 22:18:05 CET 2006</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+ <div id="description">
72
+ <h1><a href="../classes/Test/Unit/XML.html">Test::Unit::XML</a></h1>
73
+ <h2>An XML <a href="../classes/Test.html">Test</a> Framework</h2>
74
+ <p>
75
+ Version: 0.1.2
76
+ </p>
77
+ <p>
78
+ Author: Henrik M�rtensson
79
+ </p>
80
+ <p>
81
+ &#169; 2006 by Henrik M�rtensson
82
+ </p>
83
+ <h2>Introduction</h2>
84
+ <p>
85
+ <a href="../classes/Test/Unit/XML.html">Test::Unit::XML</a> extends the <a
86
+ href="../classes/Test/Unit.html">Test::Unit</a> framework with an assertion
87
+ for testing well-formed XML documents.
88
+ </p>
89
+ <p>
90
+ Using <a href="../classes/Test/Unit/XML.html">Test::Unit::XML</a> is easy.
91
+ All you have to do is to require <tt>testunitxml</tt>, and you will then
92
+ have an <tt>assert_xml_equal</tt> assertion available in the <a
93
+ href="../classes/Test/Unit/TestCase.html">Test::Unit::TestCase</a> class.
94
+ </p>
95
+ <p>
96
+ See the test case <a
97
+ href="../../../test/tc_testunitxml.rb">tc_testunitxml.rb</a> included in
98
+ the distribution package for an example.
99
+ </p>
100
+ <h2>What Does <em>Equal</em> XML Documents Mean?</h2>
101
+ <p>
102
+ It is hard to define exactly what <em>equal</em> means in the context of
103
+ XML documents. I have tried to follow W3C XML recommendations as far as
104
+ possible. There are a few things worthy of note:
105
+ </p>
106
+ <ul>
107
+ <li>Doctype declarations are not compared with each other. If a declaration is
108
+ present in one document, there must be a Doctype declaration in the other,
109
+ but there is no effort to compare them.
110
+
111
+ </li>
112
+ <li>Namespace <em>declarations</em>, i.e. attributes that declare namespaces,
113
+ are ignored for comparison purposes. (The namespaces <em>are</em> used in
114
+ comparisons.) The reason is that XML processors may move the declarations
115
+ from one element to another, or change prefixes in ways that cannot be
116
+ directly controlled by a programmer. For example, two different XSLT
117
+ processors could use the same stylesheet and produce XML documents that use
118
+ different namespace prefixes, and have declarations on different elements,
119
+ but are still considered equal.
120
+
121
+ </li>
122
+ <li>Text nodes that are empty or contain only whitespace are ignored for
123
+ comparison purposes. This makes it easier to test output from various
124
+ transformation engines. These often produce extraneous whitespace.
125
+
126
+ </li>
127
+ </ul>
128
+ <h2>The Future</h2>
129
+ <p>
130
+ There are a few things in the pipeline:
131
+ </p>
132
+ <ul>
133
+ <li>Doctype comparison. There will be assertions for comparing:
134
+
135
+ <pre>
136
+ - Entity declarations
137
+ - SYSTEM identifiers
138
+ - PUBLIC identifiers
139
+ </pre>
140
+ </li>
141
+ <li>Schema Validation. The first thing to add is validation against RELAX NG
142
+ schemas. This will probably be done by having <a
143
+ href="../classes/Test/Unit/XML.html">Test::Unit::XML</a> call Jing, a
144
+ popular RELAX NG validator written in Java. I will also look into DTD
145
+ validation, and (Urgh!) W3C Schema validation, but RELAX NG has top
146
+ priority, because it is the most powerful and flexible of the three schema
147
+ types.
148
+
149
+ </li>
150
+ <li>Configurability. It <em>might</em> be useful to be able to set
151
+ configuration options for testing. I&#8217;ll have to think a bit about
152
+ this though.
153
+
154
+ </li>
155
+ <li>Document difference functions, like the Java XMLUnit test suite.
156
+
157
+ </li>
158
+ </ul>
159
+ <p>
160
+ I plan to implement these features as I need them in other projects, so
161
+ there is no time plan, and no guarantee as to the order in which I&#8217;ll
162
+ implement anything.
163
+ </p>
164
+ <h2>License</h2>
165
+ <p>
166
+ See the <a href="MIT-LICENSE.html">MIT-LICENSE</a> file.
167
+ </p>
168
+ <h2>Contact</h2>
169
+ <p>
170
+ You can email bug reports, opinions and questions to <a
171
+ href="mailto:self@henrikmartensson.org">self@henrikmartensson.org</a>. You
172
+ may also wish to visit my home page, <a
173
+ href="http://www.henrikmartensson.org">www.henrikmartensson.org</a>, for
174
+ more information about <a
175
+ href="../classes/Test/Unit/XML.html">Test::Unit::XML</a> and other
176
+ projects.
177
+ </p>
178
+ <p>
179
+ If you find <a href="../classes/Test/Unit/XML.html">Test::Unit::XML</a>
180
+ useful, please do tell me about it. I would like to list projects that use
181
+ it on my web site.
182
+ </p>
183
+ <p>
184
+ If you find <a href="../classes/Test/Unit/XML.html">Test::Unit::XML</a>
185
+ lacking in some respect, or buggy, I am even more interested. I can&#8217;t
186
+ fix bugs I do not know about.
187
+ </p>
188
+ <p>
189
+ Finally, if you write about <a
190
+ href="../classes/Test/Unit/XML.html">Test::Unit::XML</a>, I&#8217;d like to
191
+ link to the article on my web site, or at least mention it if you write for
192
+ a magazine, so please tell me.
193
+ </p>
194
+
195
+ </div>
196
+
197
+
198
+ </div>
199
+
200
+
201
+ </div>
202
+
203
+
204
+ <!-- if includes -->
205
+
206
+ <div id="section">
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+ <!-- if method_list -->
216
+
217
+
218
+ </div>
219
+
220
+
221
+ <div id="validator-badges">
222
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
223
+ </div>
224
+
225
+ </body>
226
+ </html>
@@ -0,0 +1,101 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>File: attributes_mixin.rb</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="fileHeader">
50
+ <h1>attributes_mixin.rb</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>lib/test/unit/xml/attributes_mixin.rb
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Mon Jan 09 22:18:03 CET 2006</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+
72
+
73
+ </div>
74
+
75
+
76
+ </div>
77
+
78
+
79
+ <!-- if includes -->
80
+
81
+ <div id="section">
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+ <!-- if method_list -->
91
+
92
+
93
+ </div>
94
+
95
+
96
+ <div id="validator-badges">
97
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
98
+ </div>
99
+
100
+ </body>
101
+ </html>
@@ -0,0 +1,101 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>File: nodeiterator.rb</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="fileHeader">
50
+ <h1>nodeiterator.rb</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>lib/test/unit/xml/nodeiterator.rb
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Mon Jan 09 22:18:03 CET 2006</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+
72
+
73
+ </div>
74
+
75
+
76
+ </div>
77
+
78
+
79
+ <!-- if includes -->
80
+
81
+ <div id="section">
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+ <!-- if method_list -->
91
+
92
+
93
+ </div>
94
+
95
+
96
+ <div id="validator-badges">
97
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
98
+ </div>
99
+
100
+ </body>
101
+ </html>
@@ -0,0 +1,112 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>File: xml_assertions.rb</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="fileHeader">
50
+ <h1>xml_assertions.rb</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>lib/test/unit/xml/xml_assertions.rb
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Mon Jan 09 22:18:03 CET 2006</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+
72
+ <div id="requires-list">
73
+ <h3 class="section-bar">Required files</h3>
74
+
75
+ <div class="name-list">
76
+ rexml/document&nbsp;&nbsp;
77
+ test/unit/xml/attributes_mixin&nbsp;&nbsp;
78
+ test/unit&nbsp;&nbsp;
79
+ test/unit/xml/xmlequalfilter&nbsp;&nbsp;
80
+ test/unit/xml/nodeiterator&nbsp;&nbsp;
81
+ </div>
82
+ </div>
83
+
84
+ </div>
85
+
86
+
87
+ </div>
88
+
89
+
90
+ <!-- if includes -->
91
+
92
+ <div id="section">
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+ <!-- if method_list -->
102
+
103
+
104
+ </div>
105
+
106
+
107
+ <div id="validator-badges">
108
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
109
+ </div>
110
+
111
+ </body>
112
+ </html>