public void FromXmlTwoItems()
        {
            XPathHistoryList list = new XPathHistoryList();

            list.Add("//test");
            list.Add("//a");
            list.WriteTo(writer);

            string        propertiesXml = "<SerializedNode>" + xml.ToString() + "</SerializedNode>";
            XmlTextReader reader        = new XmlTextReader(new StringReader(propertiesXml));

            list = new XPathHistoryList();
            list = (XPathHistoryList)list.ReadFrom(reader);

            string[] xpaths = list.GetXPaths();
            Assert.AreEqual(2, xpaths.Length);
            Assert.AreEqual("//test", xpaths[0]);
            Assert.AreEqual("//a", xpaths[1]);
        }
		public void ToXmlOneItem()
		{
			XPathHistoryList list = new XPathHistoryList();
			list.Add("//test");
			list.WriteTo(writer);
			
			string expectedXml = "<XPathHistoryList>\n" +
				"\t<XPath>//test</XPath>\n" +
				"</XPathHistoryList>";
			Assert.AreEqual(expectedXml, xml.ToString());
		}
        public void ToXmlOneItem()
        {
            XPathHistoryList list = new XPathHistoryList();

            list.Add("//test");
            list.WriteTo(writer);

            string expectedXml = "<XPathHistoryList>\n" +
                                 "\t<XPath>//test</XPath>\n" +
                                 "</XPathHistoryList>";

            Assert.AreEqual(expectedXml, xml.ToString());
        }
		public void FromXmlOneItem()
		{
			XPathHistoryList list = new XPathHistoryList();
			list.Add("//test");
			list.WriteTo(writer);
			
			string propertiesXml = "<SerializedNode>" + xml.ToString() + "</SerializedNode>";
			XmlTextReader reader = new XmlTextReader(new StringReader(propertiesXml));
			list = new XPathHistoryList();
			list = (XPathHistoryList)list.ReadFrom(reader);
			string[] xpaths = list.GetXPaths();

			Assert.AreEqual(1, xpaths.Length);
			Assert.AreEqual("//test", xpaths[0]);
		}