Example #1
0
 public void GetRootsSquareEquation_WhenABCPassed_ShouldDivideByZeroException(double a, double b, double c)
 {
     Assert.Throws <DivideByZeroException>(() => Branching.GetRootsSquareEquation(a, b, c));
 }
Example #2
0
        public void GetRootsSquareEquation_WhenABCPassed_ShouldRootsSquareEquation(double a, double b, double c, double[] expected)
        {
            double[] actual = Branching.GetRootsSquareEquation(a, b, c);

            Assert.That(actual, Is.EqualTo(expected).Within(3));
        }