[Sys.Xml] Add unit test for Novell bug #599689
authorEberhard Beilharz <eb1@sil.org>
Thu, 27 Feb 2014 15:28:08 +0000 (16:28 +0100)
committerEberhard Beilharz <eb1@sil.org>
Thu, 27 Feb 2014 15:28:08 +0000 (16:28 +0100)
The unit test demonstrates a difference between Mono and .NET
(https://bugzilla.novell.com/show_bug.cgi?id=599689).

mcs/class/System.XML/System.Xml_test.dll.sources
mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaExceptionTests.cs [new file with mode: 0644]

index f03ff065a2e535c0b6d435cf8794dbf6f700d616..bf25cf598911e0e75e376f15fee57539aea6c87d 100644 (file)
@@ -105,6 +105,7 @@ System.Xml.Xsl/MsxslScriptTests.cs
 System.Xml/XmlExceptionCas.cs
 System.Xml/XmlSecureResolverCas.cs
 System.Xml.Schema/XmlSchemaExceptionCas.cs
+System.Xml.Schema/XmlSchemaExceptionTests.cs
 System.Xml.Xsl/XsltArgumentListCas.cs
 System.Xml.Xsl/XsltCompileExceptionCas.cs
 System.Xml.Xsl/XsltCompileExceptionTests.cs
diff --git a/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaExceptionTests.cs b/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaExceptionTests.cs
new file mode 100644 (file)
index 0000000..0f34a9c
--- /dev/null
@@ -0,0 +1,27 @@
+// Copyright (c) 2014 SIL International
+// This software is licensed under the MIT License (http://opensource.org/licenses/MIT)
+//
+// Unit tests for XmlSchemaException
+//
+// Author:
+//     Eberhard Beilharz <eb1@sil.org>
+//
+using System;
+using System.Xml.Schema;
+using NUnit.Framework;
+
+namespace MonoTests.System.Xml
+{
+       [TestFixture]
+       public class XmlSchemaExceptionTests
+       {
+               [Test]
+               public void Bug599689_ToStringMatchesDotNet ()
+               {
+                       Assert.AreEqual ("System.Xml.Schema.XmlSchemaException: Test",
+                               new XmlSchemaException ("Test").ToString (),
+                               "Novell bug #599689 (https://bugzilla.novell.com/show_bug.cgi?id=599689) not fixed.");
+               }
+       }
+}
+