Esempio n. 1
0
 @Test
 public void test_CheckForGeometricSeries_1() {
   List<Integer> list = new ArrayList<Integer>();
   list.add(0);
   list.add(45);
   list.add(90);
   CheckForGeometricSeries chkGeomSeries = new CheckForGeometricSeries(list);
   assertFalse(chkGeomSeries.isGeometricSeries());
 }
Esempio n. 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);
 }
Esempio n. 3
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);
 }