private void AssertDOD(List<XPathNavigator> buffer, XPathNavigator nav, int pos)
 {
     if ((nav.GetType().ToString() != "Microsoft.VisualStudio.Modeling.StoreNavigator") && (nav.GetType().ToString() != "System.Xml.DataDocumentXPathNavigator"))
     {
         if (0 < pos)
         {
             CompareNodes(buffer[pos - 1], nav);
         }
         if (pos < buffer.Count)
         {
             CompareNodes(nav, buffer[pos]);
         }
     }
 }
		private void AssertNavigator (string label, XPathNavigator nav, XPathNodeType type, string prefix, string localName, string ns, string name, string value, bool hasAttributes, bool hasChildren, bool isEmptyElement)
		{
			label += nav.GetType ();
			Assert.AreEqual (type, nav.NodeType, label + "NodeType");
			Assert.AreEqual (prefix, nav.Prefix, label + "Prefix");
			Assert.AreEqual (localName, nav.LocalName, label + "LocalName");
			Assert.AreEqual (ns, nav.NamespaceURI, label + "Namespace");
			Assert.AreEqual (name, nav.Name, label + "Name");
			Assert.AreEqual (value, nav.Value, label + "Value");
			Assert.AreEqual (hasAttributes, nav.HasAttributes, label + "HasAttributes");
			Assert.AreEqual (hasChildren, nav.HasChildren, label + "HasChildren");
			Assert.AreEqual (isEmptyElement, nav.IsEmptyElement, label + "IsEmptyElement");
		}
		private void GetNamespaceConsistentTree (XPathNavigator nav)
		{
			nav.MoveToFirstChild ();
			nav.MoveToFirstChild ();
			nav.MoveToNext ();
			Assert.AreEqual ("ns1", nav.GetNamespace (""), "#1." + nav.GetType ());
			nav.MoveToNext ();
			nav.MoveToNext ();
			Assert.AreEqual ("", nav.GetNamespace (""), "#2." + nav.GetType ());
		}
 private void AssertDOD(List<XPathNavigator> buffer, XPathNavigator nav, int pos) {
     if (nav.GetType().ToString() == "Microsoft.VisualStudio.Modeling.StoreNavigator") return;
     if (nav.GetType().ToString() == "System.Xml.DataDocumentXPathNavigator") return;
     Debug.Assert(0 <= pos && pos <= buffer.Count, "Algorithm error: Insert()");
     XmlNodeOrder cmp;
     if (0 < pos) {
         cmp = CompareNodes(buffer[pos - 1], nav);
         Debug.Assert(cmp == XmlNodeOrder.Before, "Algorithm error: Insert()");
     }
     if (pos < buffer.Count) {
         cmp = CompareNodes(nav, buffer[pos]);
         Debug.Assert(cmp == XmlNodeOrder.Before, "Algorithm error: Insert()");
     }
 }