예제 #1
0
 @Test
 public void test_CheckForGeometricSeries_3() {
   ArrayList<Integer> list = new ArrayList<Integer>();
   list.add(8);
   list.add(4);
   list.add(2);
   CheckForGeometricSeries chkGeomSeries = new CheckForGeometricSeries(list);
   System.out.println("Returned " + chkGeomSeries.getConstant());
   assertTrue(Double.compare(chkGeomSeries.getConstant(), 0.5) == 0);
 }
예제 #2
0
 @Test
 public void test_CheckForGeometricSeries_2() {
   ArrayList<Integer> list = new ArrayList<Integer>();
   list.add(2);
   list.add(4);
   list.add(8);
   CheckForGeometricSeries chkGeomSeries = new CheckForGeometricSeries(list);
   assertTrue(Double.compare(chkGeomSeries.getConstant(), 2) == 0);
 }