public void TestEquals_DistanceNotEqual() { DistanceNode thisNode = new DistanceNode( new Point(new Vector3(1.0f, 2.0f, 3.0f)), new Point(new Vector3(4.0f, 5.0f, 6.0f)), 7.0f ); DistanceNode otherNode = new DistanceNode( new Point(new Vector3(1.0f, 2.0f, 3.0f)), new Point(new Vector3(4.0f, 5.0f, 6.0f)), 3.5f ); bool expected = false; bool actual1 = thisNode.Equals(otherNode); bool actual2 = thisNode.Equals(otherNode); Assert.That(expected, Is.EqualTo(actual1)); Assert.That(expected, Is.EqualTo(actual2)); }
public void TestEquals_ModelVectorNotEqual() { float distance = Random.value; DistanceNode thisNode = new DistanceNode( new Point(new Vector3(1.0f, 2.0f, 3.0f)), new Point(new Vector3(4.0f, 5.0f, 6.0f)), distance ); DistanceNode otherNode = new DistanceNode( new Point(new Vector3(1.0f, 2.0f, 3.0f)), new Point(new Vector3(4.0f, 6.0f, 6.0f)), distance ); bool expected = false; bool actual1 = thisNode.Equals(otherNode); bool actual2 = thisNode.Equals(otherNode); Assert.That(expected, Is.EqualTo(actual1)); Assert.That(expected, Is.EqualTo(actual2)); }