@Test public void testGetB() throws InvalidDataException { PythagoreanTheorem p = new PythagoreanTheorem(); p.setAC(10, 15); double b = p.getB(); Assert.assertEquals(11.18, b, 0.01); }
@Test public void testGetC() throws InvalidDataException { PythagoreanTheorem p = new PythagoreanTheorem(); p.setAB(2, 4); double c = p.getC(); Assert.assertEquals(4.47214, c, 0.01); }
@Test public void testGetA() throws InvalidDataException { PythagoreanTheorem p = new PythagoreanTheorem(); p.setBC(5, 8); double a = p.getA(); Assert.assertEquals(6.24, a, 0.01); }