public class DoubleAssert extends GenericAssert<DoubleAssert,Double> implements NumberAssert
Double
s and double
s.
To create a new instance of this class invoke
or
Assertions.assertThat(Double)
.
Assertions.assertThat(double)
Modifier and Type | Class and Description |
---|---|
static class |
DoubleAssert.Delta
Deprecated.
use top-level class
instead. This class will be removed
in version 2.0. |
actual, myself
Modifier | Constructor and Description |
---|---|
protected |
DoubleAssert(double actual)
Creates a new
. |
protected |
DoubleAssert(Double actual)
Creates a new
. |
Modifier and Type | Method and Description |
---|---|
static DoubleAssert.Delta |
delta(double d)
Deprecated.
use method
instead. This method will be
removed in version 2.0. |
DoubleAssert |
isEqualTo(double expected)
Verifies that the actual
Double is equal to the given one. |
DoubleAssert |
isEqualTo(double expected,
Delta delta)
Verifies that the actual
Double is equal to the given one, within a positive delta. |
DoubleAssert |
isEqualTo(Double expected,
Delta delta)
Verifies that the actual
Double is equal to the given one, within a positive delta. |
DoubleAssert |
isEqualTo(double expected,
DoubleAssert.Delta delta)
Deprecated.
use method
instead. This method will
be removed in version 2.0. |
DoubleAssert |
isGreaterThan(double other)
Verifies that the actual
Double is greater than the given one. |
DoubleAssert |
isGreaterThanOrEqualTo(double other)
Verifies that the actual
Double is greater or equal to the given one. |
DoubleAssert |
isLessThan(double other)
Verifies that the actual
Double is less than the given one. |
DoubleAssert |
isLessThanOrEqualTo(double other)
Verifies that the actual
Double is less or equal to the given one. |
DoubleAssert |
isNaN()
Verifies that the actual
Double is equal to . |
DoubleAssert |
isNegative()
Verifies that the actual
Double is negative. |
DoubleAssert |
isNotEqualTo(double other)
Verifies that the actual
Double is not equal to the given one. |
DoubleAssert |
isPositive()
Verifies that the actual
Double is positive. |
DoubleAssert |
isZero()
Verifies that the actual
Double is equal to zero. |
as, as, describedAs, describedAs, doesNotSatisfy, is, isEqualTo, isIn, isIn, isNot, isNotEqualTo, isNotIn, isNotIn, isNotNull, isNotSameAs, isNull, isSameAs, overridingErrorMessage, satisfies
customErrorMessage, description, description, description, equals, fail, fail, failIfCustomMessageIsSet, failIfCustomMessageIsSet, failure, formattedErrorMessage, hashCode, rawDescription, replaceDefaultErrorMessagesWith
protected DoubleAssert(double actual)
DoubleAssert
.actual
- the actual value to verify.protected DoubleAssert(Double actual)
DoubleAssert
.actual
- the actual value to verify.public DoubleAssert isEqualTo(double expected)
Double
is equal to the given one.expected
- the value to compare the actual one to.AssertionError
- if the actual Double
is not equal to the given one.@Deprecated public DoubleAssert isEqualTo(double expected, DoubleAssert.Delta delta)
isEqualTo(double, org.fest.assertions.Delta)
instead. This method will
be removed in version 2.0.Double
is equal to the given one, within a positive delta.expected
- the value to compare the actual one to.delta
- the given delta.AssertionError
- if the actual Double
is not equal to the given one.public DoubleAssert isEqualTo(double expected, Delta delta)
Double
is equal to the given one, within a positive delta.expected
- the value to compare the actual one to.delta
- the given delta.AssertionError
- if the actual Double
is not equal to the given one.public DoubleAssert isEqualTo(Double expected, Delta delta)
Double
is equal to the given one, within a positive delta.expected
- the value to compare the actual one to.delta
- the given delta.AssertionError
- if the actual Double
is not equal to the given one.public DoubleAssert isNotEqualTo(double other)
Double
is not equal to the given one.other
- the given value.AssertionError
- if the actual Double
is equal to the given one.public DoubleAssert isGreaterThan(double other)
Double
is greater than the given one.other
- the given value.AssertionError
- if the actual Double
is not greater than the given one.public DoubleAssert isLessThan(double other)
Double
is less than the given one.other
- the given value.AssertionError
- if the actual Double
is not less than the given one.public DoubleAssert isGreaterThanOrEqualTo(double other)
Double
is greater or equal to the given one.other
- the given value.AssertionError
- if the actual Double
is not greater than or equal to the given one.public DoubleAssert isLessThanOrEqualTo(double other)
Double
is less or equal to the given one.other
- the given value.AssertionError
- if the actual Double
is not less than or equal to the given one.public DoubleAssert isZero()
Double
is equal to zero.isZero
in interface NumberAssert
AssertionError
- if the actual Double
is not equal to zero.public DoubleAssert isPositive()
Double
is positive.isPositive
in interface NumberAssert
AssertionError
- if the actual Double
is not positive.public DoubleAssert isNegative()
Double
is negative.isNegative
in interface NumberAssert
AssertionError
- if the actual Double
is not negative.public DoubleAssert isNaN()
Double
is equal to Double.NaN
.AssertionError
- if the actual Double
is not equal to NAN
.@Deprecated public static DoubleAssert.Delta delta(double d)
Delta.delta(double)
instead. This method will be
removed in version 2.0.isEqualTo(double,
org.fest.assertions.DoubleAssert.Delta)
.d
- the delta value.Copyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.