コード例 #1
0
  @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());
  }
コード例 #2
0
 @Test
 public void testDistanceEuclidienne() {
   InfinitePoint wrongPoint = new InfinitePoint(4);
   boolean exceptionThrown = false;
   try {
     p.distanceEuclidienne(wrongPoint);
   } catch (DataFormatException e) {
     exceptionThrown = true;
   }
   assertTrue(exceptionThrown);
 }