public void CircularDependency_Equals_GivenNodesNotEquals_GivenNodesNotZero_ShouldReturnFalse() { //---------------Set up test pack------------------- var dependencyVisualizationNode = new DependencyVisualizationNode(Guid.NewGuid().ToString(), 2, 2, true, false); var dependencyVisualizationNode1 = new DependencyVisualizationNode(Guid.NewGuid().ToString(), 2, 2, true, false); var virtualizationNode = new List <IDependencyVisualizationNode>(); virtualizationNode.Add(dependencyVisualizationNode); var virtualizationNode1 = new List <IDependencyVisualizationNode>(); virtualizationNode.Add(dependencyVisualizationNode1); var circularDependency = new CircularDependency(virtualizationNode); var circularDependency1 = new CircularDependency(virtualizationNode1); //---------------Assert Precondition---------------- Assert.AreEqual(2, circularDependency.Nodes.Count, "circularDependency.Nodes"); Assert.AreEqual(0, circularDependency1.Nodes.Count, "circularDependency.Nodes"); //---------------Execute Test ---------------------- //---------------Test Result ----------------------- var @equals = circularDependency.Equals(circularDependency1); Assert.IsFalse(@equals); }
public void CompareTo_GivenEqualNodes_ShouldOne() { //---------------Set up test pack------------------- var circularDependency = new CircularDependency(new List <IDependencyVisualizationNode>()); var circularDependency1 = new CircularDependency(new List <IDependencyVisualizationNode>()); //---------------Assert Precondition---------------- var @equals = circularDependency.Equals(circularDependency1); Assert.IsTrue(@equals); //---------------Execute Test ---------------------- //---------------Test Result ----------------------- var compareTo = circularDependency.CompareTo(circularDependency1); Assert.AreEqual(0, compareTo); }
public void CircularDependency_Equals_GivenNodesEquals_ShouldReturnTrue() { //---------------Set up test pack------------------- var circularDependency = new CircularDependency(new List <IDependencyVisualizationNode>()); var circularDependency1 = new CircularDependency(new List <IDependencyVisualizationNode>()); //---------------Assert Precondition---------------- Assert.AreEqual(0, circularDependency.Nodes.Count, "circularDependency.Nodes"); Assert.AreEqual(0, circularDependency1.Nodes.Count, "circularDependency.Nodes"); //---------------Execute Test ---------------------- //---------------Test Result ----------------------- var @equals = circularDependency.Equals(circularDependency1); Assert.IsTrue(@equals); }