@Test(expectedExceptions = IllegalArgumentException.class) public void testNullFunction() { getIntegrator().integrate(null, LOWER, UPPER); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullLowerBound() { getIntegrator().integrate(DF, null, UPPER); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullUpperBound() { getIntegrator().integrate(DF, LOWER, null); }
@Test public void test() { assertEquals(getIntegrator().integrate(DF, LOWER, UPPER), F.apply(UPPER) - F.apply(LOWER), EPS); assertEquals(getIntegrator().integrate(DF, UPPER, LOWER), -getIntegrator().integrate(DF, LOWER, UPPER), EPS); }