diff options
author | Alistair Bush <alistair.bush@gmail.com> | 2015-01-27 18:17:52 +0300 |
---|---|---|
committer | Alistair Bush <alistair.bush@gmail.com> | 2015-01-27 18:17:52 +0300 |
commit | aba3b1a91594132d0b769981c4963dbc7ee4fb7f (patch) | |
tree | 5632aa7bf5ea8c725a6072addcc38aa6c1f87f23 /mcs/class/System.XML/Test | |
parent | 0c4cc7160a42ef7f05a841411743b6295ae22fda (diff) |
Unit test for reproduction of XmlReader.ReadToNextSibling behaviour
Diffstat (limited to 'mcs/class/System.XML/Test')
-rw-r--r-- | mcs/class/System.XML/Test/System.Xml/XmlReaderCommonTests.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mcs/class/System.XML/Test/System.Xml/XmlReaderCommonTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlReaderCommonTests.cs index 65fb3fa991d..a36fd8e6a7c 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlReaderCommonTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlReaderCommonTests.cs @@ -1753,6 +1753,19 @@ namespace MonoTests.System.Xml Assert.AreEqual (3, count, "#3");
}
+ [Test, Category("NotWorking")]
+ public void ReadToNextSiblingInInitialReadState ()
+ {
+ var xml = "<Text name=\"hello\"><Something></Something></Text>";
+ var ms = new MemoryStream(Encoding.Default.GetBytes(xml));
+ var xtr = XmlReader.Create(ms);
+
+ Assert.AreEqual(xtr.ReadState, ReadState.Initial);
+ xtr.ReadToNextSibling("Text");
+
+ Assert.AreEqual("hello", xtr.GetAttribute("name"));
+ }
+
[Test]
public void ReadSubtree ()
{
|