@Test public void test_pi_multiply() { double result = MathLib.multiply(5, MathLib.getPI()); double expected = 15.707963267948966; assertEquals(expected, result, 0.00001); }
@Test public void test_pi_divide() { double result = MathLib.divide(5, MathLib.getPI()); double expected = 1.5915494309189535; assertEquals(expected, result, 0.00001); }
@Test public void test_pi_subtract() { double result = MathLib.subtract(8, MathLib.getPI()); double expected = 4.858407346410207; assertEquals(expected, result, 0.00001); }
@Test public void test_pi_add() { double result = MathLib.add(5, MathLib.getPI()); double expected = 8.141592653589793; assertEquals(expected, result, 0.00001); }
@Test public void test_pi_failed() { double result = MathLib.getPI(); double expected = 3.14; assertEquals(expected, result, 0.00001); }
@Test public void test_pi_square() { double result = MathLib.squareRoot(MathLib.getPI()); double expected = 1.7724538509055159; assertEquals(expected, result, 0.00001); }