示例#1
0
 @Test
 public void test_CheckForArithmeticSeries_2() {
   List<Integer> list = new ArrayList<Integer>();
   list.add(0);
   list.add(1);
   list.add(1);
   CheckForArithmeticSeries chkArithSeries = new CheckForArithmeticSeries(list);
   assertFalse(chkArithSeries.isArithmeticSeries());
 }
示例#2
0
  @Test
  public void test_CheckForArithmeticSeries_1() {

    List<Integer> list = new ArrayList<Integer>();
    list.add(0);
    list.add(45);
    list.add(90);
    CheckForArithmeticSeries chkArithSeries = new CheckForArithmeticSeries(list);
    assertEquals(chkArithSeries.getConstant(), 45);
  }
示例#3
0
 @Test
 public void test_CheckForArithmeticSeries_4() {
   List<Integer> list = new ArrayList<Integer>();
   list.add(1);
   list.add(45);
   list.add(90);
   List<Integer> listOf2 = new ArrayList<Integer>();
   listOf2.add(270);
   listOf2.add(315);
   CheckForArithmeticSeries chkArithSeries = new CheckForArithmeticSeries(list);
   assertEquals(chkArithSeries.getMissingValue(listOf2), Const.NEGATIVE_INFINITY);
 }