Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs/class
diff options
context:
space:
mode:
authorGert Driesen <drieseng@users.sourceforge.net>2007-05-26 12:43:56 +0400
committerGert Driesen <drieseng@users.sourceforge.net>2007-05-26 12:43:56 +0400
commit8774ffbfae9acf5006dcf768de5ef3af34551c21 (patch)
treede5735a2b2b3e6e07138d380c0f24b23360d35a5 /mcs/class
parent021f19332ffbe03a01ec4e4a61e5fd3368163364 (diff)
* XmlWriterTests.cs: Added NotWorking Create_XmlWriter2 test.
svn path=/trunk/mcs/; revision=77988
Diffstat (limited to 'mcs/class')
-rw-r--r--mcs/class/System.XML/Test/System.Xml/ChangeLog2
-rw-r--r--mcs/class/System.XML/Test/System.Xml/XmlWriterTests.cs24
2 files changed, 25 insertions, 1 deletions
diff --git a/mcs/class/System.XML/Test/System.Xml/ChangeLog b/mcs/class/System.XML/Test/System.Xml/ChangeLog
index 63be43e17a8..6e30d7fb80c 100644
--- a/mcs/class/System.XML/Test/System.Xml/ChangeLog
+++ b/mcs/class/System.XML/Test/System.Xml/ChangeLog
@@ -2,7 +2,7 @@
* XmlWriterTests.cs: Renamed Close* tests to Create*, and improved
their coverage. Commented out newly introduced tests since they fail
- on Mono.
+ on Mono. Added NotWorking Create_XmlWriter2 test.
2007-05-16 Gert Driesen <drieseng@users.sourceforge.net>
diff --git a/mcs/class/System.XML/Test/System.Xml/XmlWriterTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlWriterTests.cs
index 81678b4b1f7..5fe6b09a7e5 100644
--- a/mcs/class/System.XML/Test/System.Xml/XmlWriterTests.cs
+++ b/mcs/class/System.XML/Test/System.Xml/XmlWriterTests.cs
@@ -352,6 +352,30 @@ namespace MonoTests.System.Xml
Assert.IsFalse (ms.CanWrite, "#D3");
}
+ [Test]
+ [Category ("NotWorking")]
+ public void Create_XmlWriter2 ()
+ {
+ MemoryStream ms = new MemoryStream ();
+ XmlWriterSettings settings = new XmlWriterSettings ();
+ XmlWriter xw = XmlWriter.Create (ms, settings);
+ XmlWriter writer = XmlWriter.Create (xw, new XmlWriterSettings ());
+ Assert.IsNotNull (writer.Settings, "#A1");
+ Assert.IsFalse (writer.Settings.CloseOutput, "#A2");
+ writer.Close ();
+ Assert.IsTrue (ms.CanWrite, "#A3");
+
+ ms = new MemoryStream ();
+ settings = new XmlWriterSettings ();
+ settings.CloseOutput = true;
+ xw = XmlWriter.Create (ms, settings);
+ writer = XmlWriter.Create (xw, new XmlWriterSettings ());
+ Assert.IsNotNull (writer.Settings, "#B1");
+ Assert.IsTrue (writer.Settings.CloseOutput, "#B2");
+ writer.Close ();
+ Assert.IsFalse (ms.CanWrite, "#B3");
+ }
+
XPathNavigator GetNavigator (string xml)
{
return new XPathDocument (XmlReader.Create (