public void TestInvertEmpty() { var vector = new MathVector(new List <double>()); var assumedVector = new MathVector(new List <double>()); var resultVector = (MathVector)vector.Invert(); Assert.IsTrue(assumedVector.Equals(resultVector)); }
public void TestInvertException() { var vector = new MathVector(new List <double>() { 0, 1 }); Assert.ThrowsException <DivideByZeroException>(() => vector.Invert()); }
public void TestInvertMultiple() { var vector = new MathVector(new List <double>() { 1, 2, 4 }); var assumedVector = new MathVector(new List <double>() { 1, 0.5, 0.25 }); var resultVector = (MathVector)vector.Invert(); Assert.IsTrue(assumedVector.Equals(resultVector)); }