Răsfoiți Sursa

Initial check-in.

svn path=/trunk/mcs/; revision=3703
Kral Ferch 24 ani în urmă
părinte
comite
3100718d55

+ 36 - 0
mcs/class/System.XML/Test/XmlProcessingInstructionTests.cs

@@ -0,0 +1,36 @@
+//
+// System.Xml.XmlTextWriterTests
+//
+// Author:
+//   Kral Ferch <[email protected]>
+//
+// (C) 2002 Kral Ferch
+//
+
+using System;
+using System.Xml;
+using NUnit.Framework;
+
+namespace Ximian.Mono.Tests
+{
+	public class XmlProcessingInstructionTests : TestCase
+	{
+		public XmlProcessingInstructionTests () : base ("Ximian.Mono.Tests.XmlProcessingInstructionTests testsuite") {}
+		public XmlProcessingInstructionTests (string name) : base (name) {}
+
+		XmlDocument document;
+		XmlProcessingInstruction pi;
+
+		protected override void SetUp ()
+		{
+			document = new XmlDocument ();
+		}
+
+		public void TestInnerAndOuterXml ()
+		{
+			pi = document.CreateProcessingInstruction ("foo", "bar");
+			AssertEquals (String.Empty, pi.InnerXml);
+			AssertEquals ("<?foo bar?>", pi.OuterXml);
+		}
+	}
+}

+ 36 - 0
mcs/class/System.XML/Test/XmlTextTests.cs

@@ -0,0 +1,36 @@
+//
+// System.Xml.XmlTextWriterTests
+//
+// Author:
+//   Kral Ferch <[email protected]>
+//
+// (C) 2002 Kral Ferch
+//
+
+using System;
+using System.Xml;
+using NUnit.Framework;
+
+namespace Ximian.Mono.Tests
+{
+	public class XmlTextTests : TestCase
+	{
+		public XmlTextTests () : base ("Ximian.Mono.Tests.XmlTextTests testsuite") {}
+		public XmlTextTests (string name) : base (name) {}
+
+		XmlDocument document;
+		XmlText text;
+
+		protected override void SetUp ()
+		{
+			document = new XmlDocument ();
+		}
+
+		public void TestInnerAndOuterXml ()
+		{
+			text = document.CreateTextNode ("&<>\"'");
+			AssertEquals (String.Empty, text.InnerXml);
+			AssertEquals ("&amp;&lt;&gt;\"'", text.OuterXml);
+		}
+	}
+}