@Test public void testDistanceEuclidienne2() throws DataFormatException { List<Double> variables = new LinkedList<Double>(); for (double d : p.getVariables()) variables.add(d); InfinitePoint Point = new InfinitePoint(variables); assertTrue(p.distanceEuclidienne(Point) < InfinitePoint.getEpsilon()); }
@Test public void testDistanceEuclidienne() { InfinitePoint wrongPoint = new InfinitePoint(4); boolean exceptionThrown = false; try { p.distanceEuclidienne(wrongPoint); } catch (DataFormatException e) { exceptionThrown = true; } assertTrue(exceptionThrown); }