public void Test_IsDescendant_Self() { GraphNode<string> graphNode = new GraphNode<string>(string.Empty); Assert.That(!graphNode.IsDescedant(graphNode)); }
public void Test_IsDescendant_Child() { GraphNode<string> parentGraphNode = new GraphNode<string>("parent"); GraphNode<string> childGraphNode = new GraphNode<string>("child"); parentGraphNode.AddChild(childGraphNode); Assert.That(parentGraphNode.IsDescedant(childGraphNode)); }