public void FromXmlContainingNoXPathHistoryList()
        {
            XPathHistoryList list   = new XPathHistoryList();
            XmlTextReader    reader = new XmlTextReader(new StringReader("<SerializedNode/>"));

            list = (XPathHistoryList)list.ReadFrom(reader);
            Assert.AreEqual(0, list.GetXPaths().Length);
        }
		public void ToXmlNoItems()
		{
			XPathHistoryList list = new XPathHistoryList();
			list.WriteTo(writer);
			
			string expectedXml = "<XPathHistoryList />";
			Assert.AreEqual(expectedXml, xml.ToString());
		}
        public void ToXmlNoItems()
        {
            XPathHistoryList list = new XPathHistoryList();

            list.WriteTo(writer);

            string expectedXml = "<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 FromXmlNoItems()
		{
			XPathHistoryList list = new XPathHistoryList();
			list.WriteTo(writer);
			
			string propertiesXml = "<SerializedNode>" + xml.ToString() + "</SerializedNode>";
			XmlTextReader reader = new XmlTextReader(new StringReader(propertiesXml));
			list = new XPathHistoryList();
			list = (XPathHistoryList)list.ReadFrom(reader);
			
			Assert.AreEqual(0, list.GetXPaths().Length);
		}
        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 FromXmlNoItems()
        {
            XPathHistoryList list = new XPathHistoryList();

            list.WriteTo(writer);

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

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

            Assert.AreEqual(0, list.GetXPaths().Length);
        }
		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]);
		}
        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]);
        }
		public void FromXmlContainingNoXPathHistoryList()
		{
			XPathHistoryList list = new XPathHistoryList();
			XmlTextReader reader = new XmlTextReader(new StringReader("<SerializedNode/>"));
			list = (XPathHistoryList)list.ReadFrom(reader);
			Assert.AreEqual(0, list.GetXPaths().Length);
		}