TheTests.cs 2.1 KB

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