DoubleCondition extends BasicCondition<Double, DoubleCondition> implements FloatingPointChecks<Double, DoubleCondition> { @Override public DoubleCondition isGreaterThan(Double number) { require(this.subject).isNotNull(); require(number).isNotNull(); if (!(Double.compare(this.subject, number) > 0)) { DbcAssertionError.throwNew(new IllegalArgumentException("Expected double <" + this.subject + "> to be greater than <" + number + ">"), this.message); } return result(); } DoubleCondition(Double subject); @Override DoubleCondition isGreaterThan(Double number); @Override DoubleCondition isGreaterThanOrEqual(Double number); @Override DoubleCondition isLessThan(Double number); @Override DoubleCondition isLessThanOrEqual(Double number); @Override DoubleCondition isNear(Double floatingPointNumber); @Override DoubleCondition isNearWithTolerance(Double floatingPointNumber, Double tolerance); @Override DoubleCondition isNearZero(); @Override DoubleCondition isNearZeroWithTolerance(Double tolerance); @Deprecated @Override DoubleCondition isEqualTo(Double toCompare);  }
@Test public void isGreaterThan() throws Exception { DoubleCondition condition = new DoubleCondition(2.0D); condition.isGreaterThan(1D); assertThatThrownBy(() -> condition.isGreaterThan(3D)) .isInstanceOf(DbcAssertionError.class) .hasCauseInstanceOf(IllegalArgumentException.class); }