public static void Magnitude_3D(double x1, double y1, double z1, double x2, double y2, double z2, double expectedResult) { double xComponent = x2 - x1; double yComponent = y2 - y1; double zComponent = z2 - z1; Assert.AreEqual(expectedResult, VectorLibrary.Magnitude3D(xComponent, yComponent, zComponent), Tolerance); }
public static void Magnitude_3D_Throws_ArgumentException_for_Zero_Magnitude() { Assert.Throws <ArgumentException>(() => VectorLibrary.Magnitude3D(0, 0, 0)); }