Permalink
Browse files

Make XmlWriterSettingsTests .net compatible

  • Loading branch information...
marek-safar committed Jun 6, 2012
1 parent 19f5112 commit 9215ddf7ade5f0f0f54c2adb7b165e4e3e77433b
@@ -83,8 +83,7 @@ public void Reset ()
encoding = Encoding.UTF8;
indent = false;
indentChars = " ";
// LAMESPEC: MS.NET says it is "\r\n", but it is silly decision.
newLineChars = Environment.NewLine;
newLineChars = "\r\n";
newLineOnAttributes = false;
newLineHandling = NewLineHandling.Replace;
omitXmlDeclaration = false;
@@ -608,8 +608,8 @@ public void InnerXmlTextEscape ()
XPathNavigator nav = doc.CreateNavigator ();
XPathNodeIterator iter = nav.Select ("/Abc/Foo");
iter.MoveNext ();
Assert.AreEqual ("Hello<" + Environment.NewLine + "InnerXml", iter.Current.InnerXml, "#1");
Assert.AreEqual ("<Foo>Hello&lt;" + Environment.NewLine + "InnerXml</Foo>", iter.Current.OuterXml, "#2");
Assert.AreEqual ("Hello&lt;\r\nInnerXml", iter.Current.InnerXml, "#1");
Assert.AreEqual ("<Foo>Hello&lt;\r\nInnerXml</Foo>", iter.Current.OuterXml, "#2");
iter = nav.Select ("/Abc/Foo/text()");
iter.MoveNext ();
Assert.AreEqual (String.Empty, iter.Current.InnerXml, "#3");
@@ -37,9 +37,13 @@ private void DefaultValue (XmlWriterSettings s)
Assert.AreEqual (Encoding.UTF8, s.Encoding);
Assert.AreEqual (false, s.Indent);
Assert.AreEqual (" ", s.IndentChars);
Assert.AreEqual (Environment.NewLine, s.NewLineChars);
Assert.AreEqual ("\r\n", s.NewLineChars);
Assert.AreEqual (false, s.NewLineOnAttributes);
Assert.AreEqual (false, s.OmitXmlDeclaration);
Assert.AreEqual (NewLineHandling.Replace, s.NewLineHandling);
#if NET_4_5
Assert.IsFalse (s.Async);
#endif
}
[Test]
@@ -416,7 +416,6 @@ public void Bug456103 ()
Assert.IsTrue (i.MoveNext (), "#2");
}
#if NET_2_0
[Test]
public void ValueAsBoolean ()
{
@@ -687,6 +686,5 @@ public void SelectChildrenEmpty ()
return;
Assert.Fail ("no selection");
}
#endif
}
}

0 comments on commit 9215ddf

Please sign in to comment.