コード例 #1
0
  /** Test of converges method, of class EqualsLastValue. */
  @Test
  public void testConverges() {
    System.out.println("converges");
    Double[] series = this._converges;
    EqualsLastValue<Double> instance = this._double;
    boolean expResult = true;
    boolean result = instance.converges(series);
    assertEquals("Convergent series does not converge.", expResult, result);

    series = this._same;
    result = instance.converges(series);
    assertEquals("Series of same values does not converge.", expResult, result);

    series = this._unimportantNull;
    result = instance.converges(series);
    assertEquals("Series of with unimportant null values does not converge.", expResult, result);

    series = this._diverges;
    expResult = false;
    result = instance.converges(series);
    assertEquals("Divergent series converges.", expResult, result);

    series = this._importantNull;
    result = instance.converges(series);
    assertEquals("Series of with important null value converges.", expResult, result);
  }
コード例 #2
0
 /** Test of converges method, of class EqualsLastValue, for the value null. */
 @Test(expected = NullPointerException.class)
 public void testConverges_Null() {
   System.out.println("converges(null)");
   Double[] series = null;
   EqualsLastValue<Double> instance = this._double;
   instance.converges(series);
   fail("No exception thrown.");
 }
コード例 #3
0
 /** Test of converges method, of class EqualsLastValue, for an empty array. Length is 0 (zero). */
 @Test
 public void testConverges_ArrayOfLengthZero() {
   System.out.println("converges(array[0])");
   Double[] series = new Double[0];
   EqualsLastValue<Double> instance = this._double;
   boolean expResult = false;
   boolean result = instance.converges(series);
   assertEquals(expResult, result);
 }