/// <summary>
 /// Asserts the parent node.
 /// </summary>
 /// <param name="resultParentNode">The result parent node.</param>
 /// <param name="nodes">The nodes.</param>
 private void AssertParentNode(NodeViewModel resultParentNode, IEnumerable<NodeViewModel> nodes)
 {
     Assert.IsNotNull(nodes, "The node collection is not initialized.");
     Assert.AreEqual(1, nodes.Count(), "The node collection should contain 1 node at the parent level.");
     Assert.AreEqual(this.siteMapNode, resultParentNode.OriginalSiteMapNode, "The OriginalSiteMapNode property of the first node is not populated correctly.");
     Assert.AreEqual(DummySiteMapProvider.ChildNodesCount, resultParentNode.ChildNodes.Count(), "The count of the child nodes of the parent node is not correct.");
 }
 /// <summary>
 /// Asserts whether NodeViewModel instance is populated correctly.
 /// </summary>
 /// <param name="expectedTitle">The expected title.</param>
 /// <param name="expectedUrl">The expected URL.</param>
 /// <param name="expectedChildNodesCount">The expected child nodes count.</param>
 /// <param name="resultNode">The result node.</param>
 private void AssertNodeViewModel(string expectedTitle, string expectedUrl, int expectedChildNodesCount, NodeViewModel resultNode)
 {
     Assert.AreEqual(expectedTitle, resultNode.Title, "The title of the node is not as expected.");
     Assert.AreEqual(expectedUrl, resultNode.Url, "The url of the node is not as expected.");
     Assert.AreEqual(expectedChildNodesCount, resultNode.ChildNodes.Count(), "The child levels are not restricted correctly.");
 }