From 86164dac136847c97a781d092c6c6be2940ce58d Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Thu, 27 Feb 2014 16:28:08 +0100 Subject: [PATCH] [Sys.Xml] Add unit test for Novell bug #599689 The unit test demonstrates a difference between Mono and .NET (https://bugzilla.novell.com/show_bug.cgi?id=599689). --- .../System.XML/System.Xml_test.dll.sources | 1 + .../XmlSchemaExceptionTests.cs | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaExceptionTests.cs diff --git a/mcs/class/System.XML/System.Xml_test.dll.sources b/mcs/class/System.XML/System.Xml_test.dll.sources index f03ff065a2e..bf25cf59891 100644 --- a/mcs/class/System.XML/System.Xml_test.dll.sources +++ b/mcs/class/System.XML/System.Xml_test.dll.sources @@ -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 index 00000000000..0f34a9ce211 --- /dev/null +++ b/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaExceptionTests.cs @@ -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 +// +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."); + } + } +} + -- 2.25.1