Added XPathScanner and Tests.
[mono.git] / mcs / class / System.XML / Test / TheTests.cs
1 using NUnit.Framework;
2 using System;
3 using System.Threading;
4 using System.Globalization;
5
6 namespace Ximian.Mono.Tests
7 {
8         public class RunXmlTextReaderTests : XmlTextReaderTests
9         {
10                 protected override void RunTest ()
11                 {
12                         TestEmptyElement ();
13                         TestEmptyElementWithWhitespace ();
14                         TestEmptyElementWithStartAndEndTag ();
15                         TestEmptyElementWithStartAndEndTagWithWhitespace ();
16                         TestNestedEmptyTag ();
17                         TestNestedText ();
18                         TestEmptyElementWithAttribute ();
19                         TestStartAndEndTagWithAttribute ();
20                         TestEmptyElementWithTwoAttributes ();
21                         TestProcessingInstructionBeforeDocumentElement ();
22                         TestCommentBeforeDocumentElement ();
23                         TestPredefinedEntities ();
24                         TestEntityReference ();
25                         TestEntityReferenceInsideText ();
26                         TestCharacterReferences ();
27                         TestEntityReferenceInAttribute ();
28                         TestPredefinedEntitiesInAttribute ();
29                         TestCharacterReferencesInAttribute ();
30                         TestCDATA ();
31                         TestEmptyElementInNamespace ();
32                         TestEmptyElementInDefaultNamespace ();
33                         TestChildElementInNamespace ();
34                         TestChildElementInDefaultNamespace ();
35                         TestAttributeInNamespace ();
36                         TestIsName ();
37                         TestIsNameToken ();
38                 }
39         }
40 }
41
42 namespace Ximian.Mono.Tests
43 {
44         public class RunXmlNamespaceManagerTests : XmlNamespaceManagerTests
45         {
46                 protected override void RunTest ()
47                 {
48                         TestNewNamespaceManager ();
49                         TestAddNamespace ();
50                         TestPushScope ();
51                         TestPopScope ();
52                 }
53         }
54 }
55
56 namespace Ximian.Mono.Tests
57 {
58         public class RunXmlDocumentTests : XmlDocumentTests
59         {
60                 protected override void RunTest ()
61                 {
62                         TestDocumentElement ();
63                 }
64         }
65 }
66
67 namespace MonoTests
68 {
69         public class RunAllTests
70         {
71                 public static void AddAllTests (TestSuite suite)
72                 {
73                         suite.AddTest (new Ximian.Mono.Tests.RunXmlTextReaderTests ());
74                         suite.AddTest (new Ximian.Mono.Tests.RunXmlNamespaceManagerTests ());
75                         suite.AddTest (new Ximian.Mono.Tests.RunXmlDocumentTests ());
76                 }
77         }
78 }
79
80 class MainApp
81 {
82         public static void Main()
83         {
84                 Thread.CurrentThread.CurrentCulture = new CultureInfo ("en-US");
85
86                 TestResult result = new TestResult ();
87                 TestSuite suite = new TestSuite ();
88                 MonoTests.RunAllTests.AddAllTests (suite);
89                 suite.Run (result);
90                 MonoTests.MyTestRunner.Print (result);
91         }
92 }
93