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
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/class/System.XML/Test/System.Xml/XmlTextWriterTests.cs')
-rw-r--r--mcs/class/System.XML/Test/System.Xml/XmlTextWriterTests.cs43
1 files changed, 43 insertions, 0 deletions
diff --git a/mcs/class/System.XML/Test/System.Xml/XmlTextWriterTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlTextWriterTests.cs
index a70f1a124d0..0108029fe0a 100644
--- a/mcs/class/System.XML/Test/System.Xml/XmlTextWriterTests.cs
+++ b/mcs/class/System.XML/Test/System.Xml/XmlTextWriterTests.cs
@@ -1513,6 +1513,49 @@ namespace MonoTests.System.Xml
}
[Test]
+ [ExpectedException (typeof (ArgumentException))]
+ public void WriteWhitespace_Null ()
+ {
+ xtw.WriteWhitespace ((string) null);
+ }
+
+ [Test]
+ [ExpectedException (typeof (ArgumentException))]
+ public void WriteWhitespace_Empty ()
+ {
+ xtw.WriteWhitespace (string.Empty);
+ }
+
+ [Test]
+ [ExpectedException (typeof (ArgumentException))]
+ public void WriteNmToken_Null ()
+ {
+ xtw.WriteNmToken ((string) null);
+ }
+
+ [Test]
+ [ExpectedException (typeof (ArgumentException))]
+ public void WriteNmToken_Empty ()
+ {
+ xtw.WriteNmToken (string.Empty);
+ }
+
+ [Test]
+ [Category ("NotWorking")] // on mono, an XmlException is thrown instead
+ [ExpectedException (typeof (ArgumentException))]
+ public void WriteNmToken_InvalidChars ()
+ {
+ xtw.WriteNmToken ("\uFFFF");
+ }
+
+ [Test]
+ public void WriteNmToken ()
+ {
+ xtw.WriteNmToken ("some:name");
+ Assert.AreEqual ("some:name", StringWriterText);
+ }
+
+ [Test]
public void XmlSpaceRaw ()
{
xtw.WriteStartElement ("foo");