public void DifferentValues() { var vector1 = new Vector3D { X = 1 }; var vector2 = new Vector3D { X = 2 }; Assert.IsFalse(vector1.Equals(vector2)); Assert.AreEqual(1, vector1.X); Assert.AreEqual(2, vector2.X); }
public void SameValues() { var vector1 = new Vector3D(1, 2, 5); var vector2 = new Vector3D(1, 2, 5); Assert.IsTrue(vector1.Equals(vector2)); Assert.AreEqual(1, vector1.X); Assert.AreEqual(2, vector1.Y); Assert.AreEqual(5, vector1.Z); Assert.AreEqual(1, vector2.X); Assert.AreEqual(2, vector2.Y); Assert.AreEqual(5, vector2.Z); }
public void NullVector() { var vector3D1 = new Vector3D(); const Vector3D nullVector = null; Assert.IsFalse(vector3D1.Equals(nullVector)); }
public void Null() { var vector = new Vector3D(); Assert.IsFalse(vector.Equals(null)); }
public void DifferentDimensions() { var vector3D = new Vector3D(); var vectorN = new VectorN(4); Assert.IsFalse(vector3D.Equals(vectorN)); }