Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 public void NullVector()
 {
     var vector3D1 = new Vector3D();
     const Vector3D nullVector = null;
     Assert.IsFalse(vector3D1.Equals(nullVector));
 }
Exemplo n.º 4
0
 public void Null()
 {
     var vector = new Vector3D();
     Assert.IsFalse(vector.Equals(null));
 }
Exemplo n.º 5
0
 public void DifferentDimensions()
 {
     var vector3D = new Vector3D();
     var vectorN = new VectorN(4);
     Assert.IsFalse(vector3D.Equals(vectorN));
 }