|
1 |
| |
|
2 |
| |
|
3 |
| |
|
4 |
| |
|
5 |
| |
|
6 |
| |
|
7 |
| |
|
8 |
| |
|
9 |
| |
|
10 |
| |
|
11 |
| |
|
12 |
| |
|
13 |
| |
|
14 |
| |
|
15 |
| |
|
16 |
| |
|
17 |
| |
|
18 |
| |
|
19 |
| |
|
20 |
| |
|
21 |
| |
|
22 |
| package nu.xom.tests; |
|
23 |
| |
|
24 |
| import nu.xom.Attribute; |
|
25 |
| import nu.xom.DocType; |
|
26 |
| import nu.xom.Element; |
|
27 |
| import nu.xom.IllegalDataException; |
|
28 |
| import nu.xom.IllegalNameException; |
|
29 |
| import nu.xom.MalformedURIException; |
|
30 |
| import nu.xom.Text; |
|
31 |
| |
|
32 |
| import org.apache.xerces.util.XMLChar; |
|
33 |
| |
|
34 |
| |
|
35 |
| |
|
36 |
| |
|
37 |
| |
|
38 |
| |
|
39 |
| |
|
40 |
| |
|
41 |
| |
|
42 |
| |
|
43 |
| |
|
44 |
| |
|
45 |
| |
|
46 |
| |
|
47 |
| |
|
48 |
| |
|
49 |
| public class VerifierTest extends XOMTestCase { |
|
50 |
| |
|
51 |
| private final static char[] subdelims = {'!', '$', '&', '\'', '(', ')' , '*', '+', ',', ';', '='}; |
|
52 |
| private final static char[] unreserved = {'-', '.', '_', '~'}; |
|
53 |
| private final static char[] unwise = {'{', '}', '|', '\\', '^', '[', ']', '`'}; |
|
54 |
| private final static char[] delims = {'<', '>', '#', '%', '^', '"'}; |
|
55 |
| |
|
56 |
55
| public VerifierTest(String name) {
|
|
57 |
55
| super(name);
|
|
58 |
| } |
|
59 |
| |
|
60 |
| |
|
61 |
1
| public void testElementNames() {
|
|
62 |
| |
|
63 |
1
| for (char c = 0; c < 65535; c++) {
|
|
64 |
| |
|
65 |
| |
|
66 |
| |
|
67 |
| |
|
68 |
65535
| if (XMLChar.isNCNameStart(c)) {
|
|
69 |
34515
| String name = String.valueOf(c);
|
|
70 |
34515
| Element e = new Element(name);
|
|
71 |
34515
| assertEquals(name, e.getLocalName());
|
|
72 |
| } |
|
73 |
| else { |
|
74 |
31020
| try {
|
|
75 |
31020
| new Element(String.valueOf(c));
|
|
76 |
0
| fail("Allowed illegal name start character "
|
|
77 |
| + Integer.toHexString(c) + " in element name"); |
|
78 |
| } |
|
79 |
| catch (IllegalNameException success) { |
|
80 |
31020
| assertNotNull(success.getMessage());
|
|
81 |
| } |
|
82 |
| } |
|
83 |
| |
|
84 |
65535
| if (XMLChar.isNCName(c)) {
|
|
85 |
35121
| String name = "a" + c;
|
|
86 |
35121
| Element e = new Element(name);
|
|
87 |
35121
| assertEquals(name, e.getLocalName());
|
|
88 |
| } |
|
89 |
| else { |
|
90 |
30414
| try {
|
|
91 |
30414
| new Element(String.valueOf(c));
|
|
92 |
0
| fail("Allowed illegal character "
|
|
93 |
| + Integer.toHexString(c) + " in element name"); |
|
94 |
| } |
|
95 |
| catch (IllegalNameException success) { |
|
96 |
30414
| assertNotNull(success.getMessage());
|
|
97 |
30414
| assertEquals(String.valueOf(c), success.getData());
|
|
98 |
| } |
|
99 |
| } |
|
100 |
| |
|
101 |
| } |
|
102 |
| |
|
103 |
| } |
|
104 |
| |
|
105 |
| |
|
106 |
| |
|
107 |
| |
|
108 |
| |
|
109 |
| |
|
110 |
| |
|
111 |
| |
|
112 |
| |
|
113 |
| |
|
114 |
| |
|
115 |
| |
|
116 |
1
| public void testLegalIRIs() {
|
|
117 |
| |
|
118 |
1
| int[] legalChars = {
|
|
119 |
| '{', '}', '<', '>', '"', '|', '\\', '^', '`', '\u007F', |
|
120 |
| 0xA0, 0xD7FF, 0xF900, 0xFDCF, 0xFDF0, |
|
121 |
| 0xFFEF, 0x10000, 0x1FFFD, 0x20000, 0x2FFFD, 0x30000, |
|
122 |
| 0x3FFFD, 0x40000, 0x4FFFD, 0x50000, 0x5FFFD, 0x60000, |
|
123 |
| 0x6FFFD, 0x70000, 0x7FFFD, 0x80000, 0x8FFFD, 0x90000, |
|
124 |
| 0x9FFFD, 0xA0000, 0xAFFFD, 0xB0000, 0xBFFFD, 0xC0000, |
|
125 |
| 0xCFFFD, 0xD0000, 0xDFFFD, 0xE1000, 0xEFFFD, 0xCFFFD}; |
|
126 |
| |
|
127 |
1
| Element element = new Element("test");
|
|
128 |
1
| for (int i = 0; i < legalChars.length; i++) {
|
|
129 |
45
| String utf16 = convertToUTF16(legalChars[i]);
|
|
130 |
45
| String url = "http://www.example.com/" + utf16 + ".xml";
|
|
131 |
45
| element.addAttribute(new Attribute("xml:base",
|
|
132 |
| "http://www.w3.org/XML/1998/namespace", url)); |
|
133 |
45
| assertEquals(url, element.getAttributeValue("base",
|
|
134 |
| "http://www.w3.org/XML/1998/namespace")); |
|
135 |
| } |
|
136 |
| |
|
137 |
| } |
|
138 |
| |
|
139 |
| |
|
140 |
1
| public void testAllASCIILettersAllowedToBeginSchemeNames() {
|
|
141 |
| |
|
142 |
1
| Element e = new Element("e");
|
|
143 |
| |
|
144 |
1
| for (char c = 'A'; c <= 'Z'; c++) {
|
|
145 |
26
| String uri = c + "scheme:schemeSpecificData";
|
|
146 |
26
| e.setNamespaceURI(uri);
|
|
147 |
26
| assertEquals(uri, e.getNamespaceURI());
|
|
148 |
| } |
|
149 |
| |
|
150 |
1
| for (char c = 'a'; c <= 'z'; c++) {
|
|
151 |
26
| String uri = c + "scheme:schemeSpecificData";
|
|
152 |
26
| e.setNamespaceURI(uri);
|
|
153 |
26
| assertEquals(uri, e.getNamespaceURI());
|
|
154 |
| } |
|
155 |
| |
|
156 |
| } |
|
157 |
| |
|
158 |
| |
|
159 |
1
| public void testAllASCIILettersAllowedInSchemeNames() {
|
|
160 |
| |
|
161 |
1
| Element e = new Element("e");
|
|
162 |
| |
|
163 |
1
| for (char c = 'A'; c <= 'Z'; c++) {
|
|
164 |
26
| String uri = "scheme" + c + ":schemeSpecificData";
|
|
165 |
26
| e.setNamespaceURI(uri);
|
|
166 |
26
| assertEquals(uri, e.getNamespaceURI());
|
|
167 |
| } |
|
168 |
| |
|
169 |
1
| for (char c = 'a'; c <= 'z'; c++) {
|
|
170 |
26
| String uri = "scheme" + c + ":schemeSpecificData";
|
|
171 |
26
| e.setNamespaceURI(uri);
|
|
172 |
26
| assertEquals(uri, e.getNamespaceURI());
|
|
173 |
| } |
|
174 |
| |
|
175 |
| } |
|
176 |
| |
|
177 |
| |
|
178 |
1
| public void testAllASCIILettersAllowedInQueryStrings() {
|
|
179 |
| |
|
180 |
1
| Element e = new Element("e");
|
|
181 |
| |
|
182 |
1
| for (char c = 'A'; c <= 'Z'; c++) {
|
|
183 |
26
| String uri = "http://www.example.com/?name=" + c;
|
|
184 |
26
| e.setNamespaceURI(uri);
|
|
185 |
26
| assertEquals(uri, e.getNamespaceURI());
|
|
186 |
| } |
|
187 |
| |
|
188 |
1
| for (char c = 'a'; c <= 'z'; c++) {
|
|
189 |
26
| String uri = "http://www.example.com/?name=" + c;
|
|
190 |
26
| e.setNamespaceURI(uri);
|
|
191 |
26
| assertEquals(uri, e.getNamespaceURI());
|
|
192 |
| } |
|
193 |
| |
|
194 |
| } |
|
195 |
| |
|
196 |
| |
|
197 |
1
| public void testAllASCIIDigitsAllowedInQueryStrings() {
|
|
198 |
| |
|
199 |
1
| Element e = new Element("e");
|
|
200 |
| |
|
201 |
1
| for (char c = '0'; c <= '9'; c++) {
|
|
202 |
10
| String uri = "http://www.example.com/?value=" + c;
|
|
203 |
10
| e.setNamespaceURI(uri);
|
|
204 |
10
| assertEquals(uri, e.getNamespaceURI());
|
|
205 |
| } |
|
206 |
| |
|
207 |
| } |
|
208 |
| |
|
209 |
| |
|
210 |
1
| public void testSlashAllowedInQueryString() {
|
|
211 |
| |
|
212 |
1
| Element e = new Element("e");
|
|
213 |
| |
|
214 |
1
| String uri = "http://www.example.com/?path=/home/elharo/docs/";
|
|
215 |
1
| e.setNamespaceURI(uri);
|
|
216 |
1
| assertEquals(uri, e.getNamespaceURI());
|
|
217 |
| |
|
218 |
| } |
|
219 |
| |
|
220 |
| |
|
221 |
1
| public void testQuestionMarkAllowedInQueryString() {
|
|
222 |
| |
|
223 |
1
| Element e = new Element("e");
|
|
224 |
| |
|
225 |
1
| String uri = "http://www.example.com/?path=?home?elharo?docs?";
|
|
226 |
1
| e.setNamespaceURI(uri);
|
|
227 |
1
| assertEquals(uri, e.getNamespaceURI());
|
|
228 |
| |
|
229 |
| } |
|
230 |
| |
|
231 |
| |
|
232 |
1
| public void testColonAllowedInQueryString() {
|
|
233 |
| |
|
234 |
1
| Element e = new Element("e");
|
|
235 |
| |
|
236 |
1
| String uri = "http://www.example.com/?path=:home:elharo:docs:";
|
|
237 |
1
| e.setNamespaceURI(uri);
|
|
238 |
1
| assertEquals(uri, e.getNamespaceURI());
|
|
239 |
| |
|
240 |
| } |
|
241 |
| |
|
242 |
| |
|
243 |
1
| public void testAtSignAllowedInQueryString() {
|
|
244 |
| |
|
245 |
1
| Element e = new Element("e");
|
|
246 |
| |
|
247 |
1
| String uri = "http://www.example.com/?path=@home@elharo@docs@";
|
|
248 |
1
| e.setNamespaceURI(uri);
|
|
249 |
1
| assertEquals(uri, e.getNamespaceURI());
|
|
250 |
| |
|
251 |
| } |
|
252 |
| |
|
253 |
| |
|
254 |
1
| public void testNonASCIICharactersNotAllowedInQueryStrings() {
|
|
255 |
| |
|
256 |
1
| Element e = new Element("e");
|
|
257 |
| |
|
258 |
1
| for (char c = 128; c <= 1024; c++) {
|
|
259 |
897
| String uri = "http://www.example.com/?value=" + c;
|
|
260 |
897
| try {
|
|
261 |
897
| e.setNamespaceURI(uri);
|
|
262 |
0
| fail("Allowed unescaped non-ASCII character " + c + " in query string");
|
|
263 |
| } |
|
264 |
| catch (MalformedURIException success) { |
|
265 |
897
| assertEquals(uri, success.getData());
|
|
266 |
| } |
|
267 |
| } |
|
268 |
| |
|
269 |
| } |
|
270 |
| |
|
271 |
| |
|
272 |
1
| public void testDelimsNotAllowedInQueryStrings() {
|
|
273 |
| |
|
274 |
1
| Element e = new Element("e");
|
|
275 |
| |
|
276 |
1
| for (int i = 0; i < delims.length; i++) {
|
|
277 |
6
| String uri = "http://www.example.com/?value=" + delims[i] + "#Must_Use_Fragment_ID";
|
|
278 |
6
| try {
|
|
279 |
6
| e.setNamespaceURI(uri);
|
|
280 |
0
| fail("Allowed delimiter character " + delims[i] + " in query string");
|
|
281 |
| } |
|
282 |
| catch (MalformedURIException success) { |
|
283 |
6
| assertEquals(uri, success.getData());
|
|
284 |
| } |
|
285 |
| } |
|
286 |
| |
|
287 |
| } |
|
288 |
| |
|
289 |
| |
|
290 |
1
| public void testUnwiseCharactersNotAllowedInQueryStrings() {
|
|
291 |
| |
|
292 |
1
| Element e = new Element("e");
|
|
293 |
| |
|
294 |
1
| for (int i = 0; i < unwise.length; i++) {
|
|
295 |
8
| String uri = "http://www.example.com/?value=" + unwise[i];
|
|
296 |
8
| try {
|
|
297 |
8
| e.setNamespaceURI(uri);
|
|
298 |
0
| fail("Allowed unwise character " + unwise[i] + " in query string");
|
|
299 |
| } |
|
300 |
| catch (MalformedURIException success) { |
|
301 |
8
| assertEquals(uri, success.getData());
|
|
302 |
| } |
|
303 |
| } |
|
304 |
| |
|
305 |
| } |
|
306 |
| |
|
307 |
| |
|
308 |
1
| public void testUnwiseCharactersNotAllowedInUserInfo() {
|
|
309 |
| |
|
310 |
1
| Element e = new Element("e");
|
|
311 |
| |
|
312 |
1
| for (int i = 0; i < unwise.length; i++) {
|
|
313 |
8
| String uri = "http://user" + unwise[i] + "name@www.example.com/?value=" + unwise[i];
|
|
314 |
8
| try {
|
|
315 |
8
| e.setNamespaceURI(uri);
|
|
316 |
0
| fail("Allowed unwise character " + unwise[i] + " in user info");
|
|
317 |
| } |
|
318 |
| catch (MalformedURIException success) { |
|
319 |
8
| assertEquals(uri, success.getData());
|
|
320 |
| } |
|
321 |
| } |
|
322 |
| |
|
323 |
| } |
|
324 |
| |
|
325 |
| |
|
326 |
1
| public void testUnwiseCharactersNotAllowedInHost() {
|
|
327 |
| |
|
328 |
1
| Element e = new Element("e");
|
|
329 |
| |
|
330 |
1
| for (int i = 0; i < unwise.length; i++) {
|
|
331 |
8
| String uri = "http://u" + unwise[i] + "www.example.com/";
|
|
332 |
8
| try {
|
|
333 |
8
| e.setNamespaceURI(uri);
|
|
334 |
0
| fail("Allowed unwise character " + unwise[i] + " in host");
|
|
335 |
| } |
|
336 |
| catch (MalformedURIException success) { |
|
337 |
8
| assertEquals(uri, success.getData());
|
|
338 |
| } |
|
339 |
| } |
|
340 |
| |
|
341 |
| } |
|
342 |
| |
|
343 |
| |
|
344 |
1
| public void testDelimsNotAllowedInHost() {
|
|
345 |
| |
|
346 |
1
| Element e = new Element("e");
|
|
347 |
| |
|
348 |
1
| for (int i = 0; i < delims.length; i++) {
|
|
349 |
6
| String uri = "http://u" + delims[i] + "www.example.com/#value";
|
|
350 |
6
| try {
|
|
351 |
6
| e.setNamespaceURI(uri);
|
|
352 |
0
| fail("Allowed unwise character " + delims[i] + " in host");
|
|
353 |
| } |
|
354 |
| catch (MalformedURIException success) { |
|
355 |
6
| assertEquals(uri, success.getData());
|
|
356 |
| } |
|
357 |
| } |
|
358 |
| |
|
359 |
| } |
|
360 |
| |
|
361 |
| |
|
362 |
1
| public void testUnwiseCharactersNotAllowedInPath() {
|
|
363 |
| |
|
364 |
1
| Element e = new Element("e");
|
|
365 |
| |
|
366 |
1
| for (int i = 0; i < unwise.length; i++) {
|
|
367 |
8
| String uri = "http://www.example.com/path" + unwise[i] + "/path";
|
|
368 |
8
| try {
|
|
369 |
8
| e.setNamespaceURI(uri);
|
|
370 |
0
| fail("Allowed unwise character " + unwise[i] + " in path");
|
|
371 |
| } |
|
372 |
| catch (MalformedURIException success) { |
|
373 |
8
| assertEquals(uri, success.getData());
|
|
374 |
| } |
|
375 |
| } |
|
376 |
| |
|
377 |
| } |
|
378 |
| |
|
379 |
| |
|
380 |
1
| public void testAllASCIILettersAllowedInHostNames() {
|
|
381 |
| |
|
382 |
1
| Element e = new Element("e");
|
|
383 |
| |
|
384 |
1
| for (char c = 'A'; c <= 'Z'; c++) {
|
|
385 |
26
| String uri = "http://" + c + ".com/";
|
|
386 |
26
| e.setNamespaceURI(uri);
|
|
387 |
26
| assertEquals(uri, e.getNamespaceURI());
|
|
388 |
| } |
|
389 |
| |
|
390 |
1
| for (char c = 'a'; c <= 'z'; c++) {
|
|
391 |
26
| String uri = "http://" + c + ".com/";
|
|
392 |
26
| e.setNamespaceURI(uri);
|
|
393 |
26
| assertEquals(uri, e.getNamespaceURI());
|
|
394 |
| } |
|
395 |
| |
|
396 |
| } |
|
397 |
| |
|
398 |
| |
|
399 |
1
| public void testAllASCIIDigitsAllowedInHostNames() {
|
|
400 |
| |
|
401 |
1
| Element e = new Element("e");
|
|
402 |
| |
|
403 |
1
| for (char c = '0'; c <= '9'; c++) {
|
|
404 |
10
| String uri = "http://c" + c + ".com/";
|
|
405 |
10
| e.setNamespaceURI(uri);
|
|
406 |
10
| assertEquals(uri, e.getNamespaceURI());
|
|
407 |
| } |
|
408 |
| |
|
409 |
| } |
|
410 |
| |
|
411 |
| |
|
412 |
1
| public void testNonASCIICharactersNotAllowedInHostNames() {
|
|
413 |
| |
|
414 |
1
| Element e = new Element("e");
|
|
415 |
| |
|
416 |
1
| for (char c = 128; c <= 1024; c++) {
|
|
417 |
897
| String uri = "http://c" + c + ".com/";
|
|
418 |
897
| try {
|
|
419 |
897
| e.setNamespaceURI(uri);
|
|
420 |
0
| fail("Allowed unescaped non-ASCII character " + c + " in host name");
|
|
421 |
| } |
|
422 |
| catch (MalformedURIException success) { |
|
423 |
897
| assertEquals(uri, success.getData());
|
|
424 |
| } |
|
425 |
| } |
|
426 |
| |
|
427 |
| } |
|
428 |
| |
|
429 |
| |
|
430 |
1
| public void testAllASCIILettersAllowedInUserInfo() {
|
|
431 |
| |
|
432 |
1
| Element e = new Element("e");
|
|
433 |
| |
|
434 |
1
| for (char c = 'A'; c <= 'Z'; c++) {
|
|
435 |
26
| String uri = "http://" + c + "@c.com/";
|
|
436 |
26
| e.setNamespaceURI(uri);
|
|
437 |
26
| assertEquals(uri, e.getNamespaceURI());
|
|
438 |
| } |
|
439 |
| |
|
440 |
1
| for (char c = 'a'; c <= 'z'; c++) {
|
|
441 |
26
| String uri = "http://" + c + "@c.com/";
|
|
442 |
26
| e.setNamespaceURI(uri);
|
|
443 |
26
| assertEquals(uri, e.getNamespaceURI());
|
|
444 |
| } |
|
445 |
| |
|
446 |
| } |
|
447 |
| |
|
448 |
| |
|
449 |
1
| public void testAllSubDelimsAllowedInUserInfo() {
|
|
450 |
| |
|
451 |
1
| Element e = new Element("e");
|
|
452 |
| |
|
453 |
1
| for (int i = 0; i < subdelims.length; i++) {
|
|
454 |
11
| String uri = "http://c" + subdelims[i] + "x@c.com/";
|
|
455 |
11
| e.setNamespaceURI(uri);
|
|
456 |
11
| assertEquals(uri, e.getNamespaceURI());
|
|
457 |
| } |
|
458 |
| |
|
459 |
| } |
|
460 |
| |
|
461 |
| |
|
462 |
1
| public void testAllSubDelimsAllowedInPath() {
|
|
463 |
| |
|
464 |
1
| Element e = new Element("e");
|
|
465 |
| |
|
466 |
1
| for (int i = 0; i < subdelims.length; i++) {
|
|
467 |
11
| String uri = "http://cc.com/path" + subdelims[i] +".html";
|
|
468 |
11
| e.setNamespaceURI(uri);
|
|
469 |
11
| assertEquals(uri, e.getNamespaceURI());
|
|
470 |
| } |
|
471 |
| |
|
472 |
| } |
|
473 |
| |
|
474 |
| |
|
475 |
1
| public void testAllUnreservedPunctuationMarksAllowedInUserInfo() {
|
|
476 |
| |
|
477 |
1
| Element e = new Element("e");
|
|
478 |
| |
|
479 |
1
| for (int i = 0; i < unreserved.length; i++) {
|
|
480 |
4
| String uri = "http://c" + unreserved[i] + "x@c.com/";
|
|
481 |
4
| e.setNamespaceURI(uri);
|
|
482 |
4
| assertEquals(uri, e.getNamespaceURI());
|
|
483 |
| } |
|
484 |
| |
|
485 |
| } |
|
486 |
| |
|
487 |
| |
|
488 |
1
| public void testAllUnreservedPunctuationMarksAllowedInHost() {
|
|
489 |
| |
|
490 |
1
| Element e = new Element("e");
|
|
491 |
| |
|
492 |
1
| for (int i = 0; i < unreserved.length; i++) {
|
|
493 |
4
| String uri = "http://c" + unreserved[i] + "xc.com/";
|
|
494 |
4
| e.setNamespaceURI(uri);
|
|
495 |
4
| assertEquals(uri, e.getNamespaceURI());
|
|
496 |
| } |
|
497 |
| |
|
498 |
| } |
|
499 |
| |
|
500 |
| |
|
501 |
1
| public void testAllSubDelimsAllowedInQueryString() {
|
|
502 |
| |
|
503 |
1
| Element e = new Element("e");
|
|
504 |
| |
|
505 |
1
| for (int i = 0; i < subdelims.length; i++) {
|
|
506 |
11
| String uri = "http://cx@c.com/?name=" + subdelims[i];
|
|
507 |
11
| e.setNamespaceURI(uri);
|
|
508 |
11
| assertEquals(uri, e.getNamespaceURI());
|
|
509 |
| } |
|
510 |
| |
|
511 |
| } |
|
512 |
| |
|
513 |
| |
|
514 |
1
| public void testAllSubDelimsAllowedInHost() {
|
|
515 |
| |
|
516 |
1
| Element e = new Element("e");
|
|
517 |
| |
|
518 |
1
| for (int i = 0; i < subdelims.length; i++) {
|
|
519 |
11
| String uri = "http://cx" + subdelims[i] + "c.com/";
|
|
520 |
11
| e.setNamespaceURI(uri);
|
|
521 |
11
| assertEquals(uri, e.getNamespaceURI());
|
|
522 |
| } |
|
523 |
| |
|
524 |
| } |
|
525 |
| |
|
526 |
| |
|
527 |
1
| public void testAllUnreservedPunctuationMarksAllowedInQueryString() {
|
|
528 |
| |
|
529 |
1
| Element e = new Element("e");
|
|
530 |
| |
|
531 |
1
| for (int i = 0; i < unreserved.length; i++) {
|
|
532 |
4
| String uri = "http://cx@c.com/?name=" + unreserved[i];
|
|
533 |
4
| e.setNamespaceURI(uri);
|
|
534 |
4
| assertEquals(uri, e.getNamespaceURI());
|
|
535 |
| } |
|
536 |
| |
|
537 |
| } |
|
538 |
| |
|
539 |
| |
|
540 |
1
| public void testAllASCIIDigitsAllowedInUserInfo() {
|
|
541 |
| |
|
542 |
1
| Element e = new Element("e");
|
|
543 |
| |
|
544 |
1
| for (char c = '0'; c <= '9'; c++) {
|
|
545 |
10
| String uri = "http://" + c + "@c.com/";
|
|
546 |
10
| e.setNamespaceURI(uri);
|
|
547 |
10
| assertEquals(uri, e.getNamespaceURI());
|
|
548 |
| } |
|
549 |
| |
|
550 |
| } |
|
551 |
| |
|
552 |
| |
|
553 |
1
| public void testNonASCIICharactersNotAllowedInUserInfo() {
|
|
554 |
| |
|
555 |
1
| Element e = new Element("e");
|
|
556 |
| |
|
557 |
1
| for (char c = 128; c <= 1024; c++) {
|
|
558 |
897
| String uri = "http://" + c + "@c.com/";
|
|
559 |
897
| try {
|
|
560 |
897
| e.setNamespaceURI(uri);
|
|
561 |
0
| fail("Allowed unescaped non-ASCII character " + c + " in user info");
|
|
562 |
| } |
|
563 |
| catch (MalformedURIException success) { |
|
564 |
897
| assertEquals(uri, success.getData());
|
|
565 |
| } |
|
566 |
| } |
|
567 |
| |
|
568 |
| } |
|
569 |
| |
|
570 |
| |
|
571 |
1
| public void testDelimCharactersNotAllowedInUserInfo() {
|
|
572 |
| |
|
573 |
1
| Element e = new Element("e");
|
|
574 |
| |
|
575 |
1
| for (int i = 0; i < delims.length; i++) {
|
|
576 |
6
| String uri = "http://c" + delims[i] + "c@c.com/?name=value#fragID";
|
|
577 |
6
| try {
|
|
578 |
6
| e.setNamespaceURI(uri);
|
|
579 |
0
| fail("Allowed delim character " + delims[i] + " in user info");
|
|
580 |
| } |
|
581 |
| catch (MalformedURIException success) { |
|
582 |
6
| assertEquals(uri, success.getData());
|
|
583 |
| } |
|
584 |
| } |
|
585 |
| |
|
586 |
| } |
|
587 |
| |
|
588 |
| |
|
589 |
1
| public void testMalformedURI() {
|
|
590 |
| |
|
591 |
1
| Element e = new Element("e");
|
|
592 |
| |
|
593 |
1
| String uri = "http://c#c@c.com/?name=value#fragID";
|
|
594 |
1
| try {
|
|
595 |
1
| e.setNamespaceURI(uri);
|
|
596 |
0
| fail("Allowed http://c#c@c.com/?name=value#fragID as URI");
|
|
597 |
| } |
|
598 |
| catch (MalformedURIException success) { |
|
599 |
1
| assertEquals(uri, success.getData());
|
|
600 |
| } |
|
601 |
| |
|
602 |
| } |
|
603 |
| |
|
604 |
| |
|
605 |
1
| public void testFragmentIDContainsQuestionMark() {
|
|
606 |
| |
|
607 |
1
| Element e = new Element("e");
|
|
608 |
| |
|
609 |
1
| String uri = "http://cc@c.com/?name=value#fragID?home/?elharo?";
|
|
610 |
1
| e.setNamespaceURI(uri);
|
|
611 |
1
| assertEquals(uri, e.getNamespaceURI());
|
|
612 |
| |
|
613 |
1
| uri = "http://cc@c.com/#fragID?name=value";
|
|
614 |
1
| e.setNamespaceURI(uri);
|
|
615 |
1
| assertEquals(uri, e.getNamespaceURI());
|
|
616 |
| |
|
617 |
| } |
|
618 |
| |
|
619 |
| |
|
620 |
1
| public void testFragmentIDContainsFirstColon() {
|
|
621 |
| |
|
622 |
1
| Element e = new Element("e");
|
|
623 |
| |
|
624 |
1
| String uri = "http://c.com/#fragID:home";
|
|
625 |
1
| e.setNamespaceURI(uri);
|
|
626 |
1
| assertEquals(uri, e.getNamespaceURI());
|
|
627 |
| |
|
628 |
1
| uri = "http://c.com/#fragID:home@eharo.com/somewhere";
|
|
629 |
1
| e.setNamespaceURI(uri);
|
|
630 |
1
| assertEquals(uri, e.getNamespaceURI());
|
|
631 |
| |
|
632 |
| } |
|
633 |
| |
|
634 |
| |
|
635 |
1
| public void testEmptyHostAllowed() {
|
|
636 |
| |
|
637 |
1
| Element e = new Element("e");
|
|
638 |
| |
|
639 |
1
| String uri = "scheme://elharo@:80/data";
|
|
640 |
1
| e.setNamespaceURI(uri);
|
|
641 |
1
| assertEquals(uri, e.getNamespaceURI());
|
|
642 |
| |
|
643 |
| } |
|
644 |
| |
|
645 |
| |
|
646 |
1
| public void testC0ControlsNotAllowedInUserInfo() {
|
|
647 |
| |
|
648 |
1
| Element e = new Element("e");
|
|
649 |
| |
|
650 |
1
| for (char c = 0; c <= ' '; c++) {
|
|
651 |
33
| String uri = "http://" + c + "@c.com/";
|
|
652 |
33
| try {
|
|
653 |
33
| e.setNamespaceURI(uri);
|
|
654 |
0
| fail("Allowed C0 control 0x" + Integer.toHexString(c) + " in user info");
|
|
655 |
| } |
|
656 |
| catch (MalformedURIException success) { |
|
657 |
33
| assertEquals(uri, success.getData());
|
|
658 |
| } |
|
659 |
| } |
|
660 |
| |
|
661 |
| } |
|
662 |
| |
|
663 |
| |
|
664 |
1
| public void testC0ControlsNotAllowedInPath() {
|
|
665 |
| |
|
666 |
1
| Element e = new Element("e");
|
|
667 |
| |
|
668 |
1
| for (char c = 0; c <= ' '; c++) {
|
|
669 |
33
| String uri = "http://www.example.com/test/" + c + "data/";
|
|
670 |
33
| try {
|
|
671 |
33
| e.setNamespaceURI(uri);
|
|
672 |
0
| fail("Allowed C0 control 0x" + Integer.toHexString(c) + " in path");
|
|
673 |
| } |
|
674 |
| catch (MalformedURIException success) { |
|
675 |
33
| assertEquals(uri, success.getData());
|
|
676 |
| } |
|
677 |
| } |
|
678 |
| |
|
679 |
| } |
|
680 |
| |
|
681 |
| |
|
682 |
1
| public void testC0ControlsNotAllowedInQueryString() {
|
|
683 |
| |
|
684 |
1
| Element e = new Element("e");
|
|
685 |
| |
|
686 |
1
| for (char c = 0; c <= ' '; c++) {
|
|
687 |
33
| String uri = "http://www.c.com/?name=" + c + "&value=7";
|
|
688 |
33
| try {
|
|
689 |
33
| e.setNamespaceURI(uri);
|
|
690 |
0
| fail("Allowed C0 control 0x" + Integer.toHexString(c) + " in query string");
|
|
691 |
| } |
|
692 |
| catch (MalformedURIException success) { |
|
693 |
33
| assertEquals(uri, success.getData());
|
|
694 |
| } |
|
695 |
| } |
|
696 |
| |
|
697 |
| } |
|
698 |
| |
|
699 |
| |
|
700 |
1
| public void testHostNameTooLong() {
|
|
701 |
| |
|
702 |
1
| StringBuffer uri = new StringBuffer("http://");
|
|
703 |
255
| for (int i = 0; i < 255; i++) uri.append('c');
|
|
704 |
1
| uri.append(".com/");
|
|
705 |
1
| Element e = new Element("e");
|
|
706 |
1
| try {
|
|
707 |
1
| e.setNamespaceURI(uri.toString());
|
|
708 |
0
| fail("Allowed excessively long host name");
|
|
709 |
| } |
|
710 |
| catch (MalformedURIException success) { |
|
711 |
1
| assertNotNull(success.getMessage());
|
|
712 |
| } |
|
713 |
| |
|
714 |
| } |
|
715 |
| |
|
716 |
| |
|
717 |
1
| public void testSymbolsNotAllowedInSchemeNames() {
|
|
718 |
| |
|
719 |
1
| Element e = new Element("e");
|
|
720 |
| |
|
721 |
1
| char[] disallowed = { ';', '@', '&', '=', '$', ',', '"', '?', '#', '/', '\\', '|',
|
|
722 |
| '_', '!', '~', '*', '\'', '(', ')', '<', '>', '[', ']', '{', '}', '^', '`'}; |
|
723 |
| |
|
724 |
1
| for (int i = 0; i < disallowed.length; i++) {
|
|
725 |
27
| String uri = "scheme" + disallowed[i] + ":schemeSpecificData";
|
|
726 |
27
| try {
|
|
727 |
27
| e.setNamespaceURI(uri);
|
|
728 |
0
| fail("allowed " + uri + " as namespace URI");
|
|
729 |
| } |
|
730 |
| catch (MalformedURIException success) { |
|
731 |
27
| assertEquals(uri, success.getData());
|
|
732 |
| } |
|
733 |
| } |
|
734 |
| |
|
735 |
| } |
|
736 |
| |
|
737 |
| |
|
738 |
1
| public void testNonASCIILettersNotAllowedToBeginSchemeNames() {
|
|
739 |
| |
|
740 |
1
| Element e = new Element("e");
|
|
741 |
| |
|
742 |
1
| for (char c = 'Z' +1; c < 'a'; c++) {
|
|
743 |
6
| String uri = c + "scheme:schemeSpecificData";
|
|
744 |
6
| try {
|
|
745 |
6
| e.setNamespaceURI(uri);
|
|
746 |
0
| fail("allowed " + uri + " as namespace URI");
|
|
747 |
| } |
|
748 |
| catch (MalformedURIException success) { |
|
749 |
6
| assertEquals(uri, success.getData());
|
|
750 |
| } |
|
751 |
| } |
|
752 |
| |
|
753 |
| } |
|
754 |
| |
|
755 |
| |
|
756 |
1
| public void testBadHexEscapeInQueryString() {
|
|
757 |
| |
|
758 |
1
| Element e = new Element("e");
|
|
759 |
| |
|
760 |
1
| String uri = "scheme:schemeSpecificData?test%5test";
|
|
761 |
1
| try {
|
|
762 |
1
| e.setNamespaceURI(uri);
|
|
763 |
0
| fail("allowed " + uri + " as namespace URI");
|
|
764 |
| } |
|
765 |
| catch (MalformedURIException success) { |
|
766 |
1
| assertEquals(uri, success.getData());
|
|
767 |
| } |
|
768 |
| |
|
769 |
1
| uri = "scheme:schemeSpecificData?test%5";
|
|
770 |
1
| try {
|
|
771 |
1
| e.setNamespaceURI(uri);
|
|
772 |
0
| fail("allowed " + uri + " as namespace URI");
|
|
773 |
| } |
|
774 |
| catch (MalformedURIException success) { |
|
775 |
1
| assertEquals(uri, success.getData());
|
|
776 |
| } |
|
777 |
| |
|
778 |
| } |
|
779 |
| |
|
780 |
| |
|
781 |
1
| public void testHexEscapeInUserInfo() {
|
|
782 |
| |
|
783 |
1
| Element e = new Element("e");
|
|
784 |
| |
|
785 |
1
| String uri = "scheme://user%C3%80TED@www.example.com/";
|
|
786 |
1
| e.setNamespaceURI(uri);
|
|
787 |
1
| assertEquals(uri, e.getNamespaceURI());
|
|
788 |
| |
|
789 |
| } |
|
790 |
| |
|
791 |
| |
|
792 |
1
| public void testHexEscapeInHost() {
|
|
793 |
| |
|
794 |
1
| Element e = new Element("e");
|
|
795 |
| |
|
796 |
1
| String uri = "scheme://user%C3%80www.example.com/";
|
|
797 |
1
| e.setNamespaceURI(uri);
|
|
798 |
1
| assertEquals(uri, e.getNamespaceURI());
|
|
799 |
| |
|
800 |
| } |
|
801 |
| |
|
802 |
| |
|
803 |
1
| public void testBadHexEscapeInUserInfo() {
|
|
804 |
| |
|
805 |
1
| Element e = new Element("e");
|
|
806 |
| |
|
807 |
1
| String uri = "scheme://user%5TED@www.example.com/";
|
|
808 |
1
| try {
|
|
809 |
1
| e.setNamespaceURI(uri);
|
|
810 |
0
| fail("allowed " + uri + " as namespace URI");
|
|
811 |
| } |
|
812 |
| catch (MalformedURIException success) { |
|
813 |
1
| assertEquals(uri, success.getData());
|
|
814 |
| } |
|
815 |
| |
|
816 |
1
| uri = "scheme://user%5@www.example.com/";
|
|
817 |
1
| try {
|
|
818 |
1
| e.setNamespaceURI(uri);
|
|
819 |
0
| fail("allowed " + uri + " as namespace URI");
|
|
820 |
| } |
|
821 |
| catch (MalformedURIException success) { |
|
822 |
1
| assertEquals(uri, success.getData());
|
|
823 |
| } |
|
824 |
| |
|
825 |
| } |
|
826 |
| |
|
827 |
| |
|
828 |
1
| public void testBadHexEscapeInHost() {
|
|
829 |
| |
|
830 |
1
| Element e = new Element("e");
|
|
831 |
| |
|
832 |
1
| String uri = "scheme://user%5TEDwww.example.com/";
|
|
833 |
1
| try {
|
|
834 |
1
| e.setNamespaceURI(uri);
|
|
835 |
0
| fail("allowed " + uri + " as namespace URI");
|
|
836 |
| } |
|
837 |
| catch (MalformedURIException success) { |
|
838 |
1
| assertEquals(uri, success.getData());
|
|
839 |
| } |
|
840 |
| |
|
841 |
1
| uri = "scheme://www.example.co%5/";
|
|
842 |
1
| try {
|
|
843 |
1
| e.setNamespaceURI(uri);
|
|
844 |
0
| fail("allowed " + uri + " as namespace URI");
|
|
845 |
| } |
|
846 |
| catch (MalformedURIException success) { |
|
847 |
1
| assertEquals(uri, success.getData());
|
|
848 |
| } |
|
849 |
| |
|
850 |
| } |
|
851 |
| |
|
852 |
| |
|
853 |
1
| public void testQuestionmarkIsNotAHexDigit() {
|
|
854 |
| |
|
855 |
1
| Element e = new Element("e");
|
|
856 |
| |
|
857 |
| |
|
858 |
| |
|
859 |
1
| String uri = "scheme://user@www.example.com/#fragment%?Adata";
|
|
860 |
1
| try {
|
|
861 |
1
| e.setNamespaceURI(uri);
|
|
862 |
0
| fail("allowed " + uri + " as namespace URI");
|
|
863 |
| } |
|
864 |
| catch (MalformedURIException success) { |
|
865 |
1
| assertEquals(uri, success.getData());
|
|
866 |
| } |
|
867 |
| |
|
868 |
| } |
|
869 |
| |
|
870 |
| |
|
871 |
1
| public void testIllegalIRIs() {
|
|
872 |
| |
|
873 |
1
| int[] illegalChars = {0x00, 0xDC00, 0xE7FF, 0xF899, 0xD800,
|
|
874 |
| 0xFDE0, 0xFFFF, 0x1FFFE, 0x2FFFE, 0x3FFFF, 0x4FFFE, |
|
875 |
| 0x4FFFF, 0x5FFFE, 0x6FFFF, 0x7FFFE, 0x8FFFF, 0x9FFFE, |
|
876 |
| 0xAFFFE, 0xBFFFF, 0xCFFFE, 0xDFFFE, 0xEFFFF, 0xFDDF}; |
|
877 |
| |
|
878 |
1
| for (int i = 0; i < illegalChars.length; i++) {
|
|
879 |
23
| String utf16 = convertToUTF16(illegalChars[i]);
|
|
880 |
23
| String url = "http://www.example.com/" + utf16 + ".xml";
|
|
881 |
23
| try {
|
|
882 |
23
| new DocType("root", url);
|
|
883 |
0
| fail("Allowed URL containing 0x" +
|
|
884 |
| Integer.toHexString(illegalChars[i]).toUpperCase()); |
|
885 |
| } |
|
886 |
| catch (MalformedURIException success) { |
|
887 |
23
| assertNotNull(success.getMessage());
|
|
888 |
23
| assertEquals(url, success.getData());
|
|
889 |
| } |
|
890 |
| } |
|
891 |
| |
|
892 |
| } |
|
893 |
| |
|
894 |
| |
|
895 |
1
| public void testLegalIP6Addresses() {
|
|
896 |
| |
|
897 |
1
| String[] addresses = {
|
|
898 |
| "FEDC:BA98:7654:3210:FEDC:BA98:7654:3210", |
|
899 |
| "1080:0:0:0:8:800:200C:4171", |
|
900 |
| "3ffe:2a00:100:7031::1", |
|
901 |
| "1080::8:800:200C:417A", |
|
902 |
| "::192.9.5.5", |
|
903 |
| "::FFFF:129.144.52.38", |
|
904 |
| "2010:836B:4179::836B:4179", |
|
905 |
| "1080:0:0:0:8:800:200C:417A", |
|
906 |
| "FF01:0:0:0:0:0:0:101", |
|
907 |
| "0:0:0:0:0:0:0:1", |
|
908 |
| "0:0:0:0:0:0:0:0", |
|
909 |
| "1080::8:800:200C:417A", |
|
910 |
| "FF01::101", |
|
911 |
| "::1", |
|
912 |
| "::", |
|
913 |
| "0:0:0:0:0:0:13.1.68.3", |
|
914 |
| "0:0:0:0:0:FFFF:129.144.52.38", |
|
915 |
| "::13.1.68.3", |
|
916 |
| "::FFFF:129.144.52.38" |
|
917 |
| }; |
|
918 |
| |
|
919 |
1
| Element element = new Element("test");
|
|
920 |
1
| for (int i = 0; i < addresses.length; i++) {
|
|
921 |
19
| String url = "http://[" + addresses[i] + "]/";
|
|
922 |
19
| element.addAttribute(new Attribute("xml:base",
|
|
923 |
| "http://www.w3.org/XML/1998/namespace", url)); |
|
924 |
19
| assertEquals(url, element.getBaseURI());
|
|
925 |
| } |
|
926 |
| |
|
927 |
| } |
|
928 |
| |
|
929 |
| |
|
930 |
1
| public void testIllegalIP6Addresses() {
|
|
931 |
| |
|
932 |
1
| String[] addresses = {
|
|
933 |
| "FEDC:BA98:7654:3210:GEDC:BA98:7654:3 210", |
|
934 |
| "FEDC:BA98:7654:3210:FEDC:BA98:7654:3210:4352", |
|
935 |
| "FEDC:BA98:7654:3210:GEDC:BA98:7654:3210", |
|
936 |
| "FEDC:BA98:7654:3210:GEDC:BA98:7654:G210", |
|
937 |
| "FEDC:BA98:7654:3210:GEDC:BA98:7654: 3210", |
|
938 |
| "FEDC:BA98:7654:3210:GEDC:BA98:7654:+3210", |
|
939 |
| "FEDC:BA98:7654:3210:GEDC:BA98:7654:3210 ", |
|
940 |
| "FEDC:BA98:7654:3210:GEDC:BA98:7654:32 10", |
|
941 |
| "1080:0:::8:800:200C:4171", |
|
942 |
| "3ffe::100:7031::1", |
|
943 |
| "::192.9.5", |
|
944 |
| "::FFFF:129.144.52.38.56", |
|
945 |
| "::FFFF:129.144.52.A3", |
|
946 |
| "::FFFF:129.144.52.-22", |
|
947 |
| "::FFFF:129.144.52.+22", |
|
948 |
| "::FFFF:256.144.52.+22", |
|
949 |
| "::FFFF:www.apple.com", |
|
950 |
| "1080:0:0:0:8:800:-200C:417A", |
|
951 |
| "1080:0:0:0:-8:800:-200C:417A" |
|
952 |
| }; |
|
953 |
| |
|
954 |
1
| for (int i = 0; i < addresses.length; i++) {
|
|
955 |
19
| String url = "http://[" + addresses[i] + "]/";
|
|
956 |
19
| try {
|
|
957 |
19
| new DocType("root", url);
|
|
958 |
0
| fail("Allowed illegal IPv6 address: " + addresses[i] );
|
|
959 |
| } |
|
960 |
| catch (MalformedURIException success) { |
|
961 |
19
| assertNotNull(success.getMessage());
|
|
962 |
19
| assertTrue(success.getData().indexOf(addresses[i]) >= 0);
|
|
963 |
| } |
|
964 |
| } |
|
965 |
| |
|
966 |
| } |
|
967 |
| |
|
968 |
| |
|
969 |
| |
|
970 |
| |
|
971 |
| private static int LEAD_OFFSET = 0xD800 - (0x10000 >> 10); |
|
972 |
| |
|
973 |
68
| private static String convertToUTF16(int c) {
|
|
974 |
| |
|
975 |
24
| if (c <= 0xFFFF) return String.valueOf((char) c);
|
|
976 |
44
| char high = (char) (LEAD_OFFSET + (c >> 10));
|
|
977 |
44
| char low = (char) (0xDC00 + (c & 0x3FF));
|
|
978 |
44
| StringBuffer sb = new StringBuffer(2);
|
|
979 |
44
| sb.append(high);
|
|
980 |
44
| sb.append(low);
|
|
981 |
44
| return sb.toString().toLowerCase();
|
|
982 |
| |
|
983 |
| } |
|
984 |
| |
|
985 |
| |
|
986 |
1
| public void testC0Controls() {
|
|
987 |
| |
|
988 |
1
| for (char c = 0; c < '\t'; c++) {
|
|
989 |
9
| try {
|
|
990 |
9
| new Text(String.valueOf(c));
|
|
991 |
| } |
|
992 |
| catch (IllegalDataException success) { |
|
993 |
9
| assertNotNull(success.getMessage());
|
|
994 |
| } |
|
995 |
| } |
|
996 |
| |
|
997 |
1
| for (char c = '\r'+1; c < ' '; c++) {
|
|
998 |
18
| try {
|
|
999 |
18
| new Text(String.valueOf(c));
|
|
1000 |
| } |
|
1001 |
| catch (IllegalDataException success) { |
|
1002 |
18
| assertNotNull(success.getMessage());
|
|
1003 |
18
| assertEquals(String.valueOf(c), success.getData());
|
|
1004 |
| } |
|
1005 |
| } |
|
1006 |
| |
|
1007 |
| } |
|
1008 |
| |
|
1009 |
| |
|
1010 |
1
| public void testAttributeNameThatEndsWithAColon() {
|
|
1011 |
| |
|
1012 |
1
| try {
|
|
1013 |
1
| new Attribute("name:", "http://www.example.com", "value", Attribute.Type.CDATA);
|
|
1014 |
0
| fail("Allowed attribute name that ends with a colon");
|
|
1015 |
| } |
|
1016 |
| catch (IllegalNameException success) { |
|
1017 |
1
| assertNotNull(success.getMessage());
|
|
1018 |
1
| assertEquals("name:", success.getData());
|
|
1019 |
| } |
|
1020 |
| |
|
1021 |
| } |
|
1022 |
| |
|
1023 |
| |
|
1024 |
1
| public void testAttributeNameThatBeginsWithAColon() {
|
|
1025 |
| |
|
1026 |
1
| try {
|
|
1027 |
1
| new Attribute(":name", "http://www.example.com", "value", Attribute.Type.CDATA);
|
|
1028 |
0
| fail("Allowed attribute name that begins with a colon");
|
|
1029 |
| } |
|
1030 |
| catch (IllegalNameException success) { |
|
1031 |
1
| assertNotNull(success.getMessage());
|
|
1032 |
1
| assertEquals(":name", success.getData());
|
|
1033 |
| } |
|
1034 |
| |
|
1035 |
| } |
|
1036 |
| |
|
1037 |
| |
|
1038 |
1
| public void testElementNameThatEndsWithAColon() {
|
|
1039 |
| |
|
1040 |
1
| try {
|
|
1041 |
1
| new Element("name:", "http://www.example.com");
|
|
1042 |
0
| fail("Allowed element name that ends with a colon");
|
|
1043 |
| } |
|
1044 |
| catch (IllegalNameException success) { |
|
1045 |
1
| assertNotNull(success.getMessage());
|
|
1046 |
1
| assertEquals("name:", success.getData());
|
|
1047 |
| } |
|
1048 |
| |
|
1049 |
| } |
|
1050 |
| |
|
1051 |
| |
|
1052 |
1
| public void testElementNameThatBeginsWithAColon() {
|
|
1053 |
| |
|
1054 |
1
| try {
|
|
1055 |
1
| new Element(":name", "http://www.example.com");
|
|
1056 |
0
| fail("Allowed element name that begins with a colon");
|
|
1057 |
| } |
|
1058 |
| catch (IllegalNameException success) { |
|
1059 |
1
| assertNotNull(success.getMessage());
|
|
1060 |
1
| assertEquals(":name", success.getData());
|
|
1061 |
| } |
|
1062 |
| |
|
1063 |
| } |
|
1064 |
| |
|
1065 |
| |
|
1066 |
| } |