public class FloatAssert extends GenericAssert<FloatAssert,Float> implements NumberAssert
Float
s and float
s.
To create a new instance of this class invoke either
or
Assertions.assertThat(Float)
.
Assertions.assertThat(float)
Modifier and Type | Class and Description |
---|---|
static class |
FloatAssert.Delta
Deprecated.
use top-level class
instead. This class will be removed
in version 2.0. |
actual, myself
Modifier | Constructor and Description |
---|---|
protected |
FloatAssert(float actual)
Creates a new
. |
protected |
FloatAssert(Float actual)
Creates a new
. |
Modifier and Type | Method and Description |
---|---|
static FloatAssert.Delta |
delta(float d)
Deprecated.
use method
instead. This method will be
removed in version 2.0. |
FloatAssert |
isEqualTo(float expected)
Verifies that the actual
Float is equal to the given one. |
FloatAssert |
isEqualTo(float expected,
Delta delta)
Verifies that the actual
Float is equal to the given one, within a positive delta. |
FloatAssert |
isEqualTo(Float expected,
Delta delta)
Verifies that the actual
Float is equal to the given one, within a positive delta. |
FloatAssert |
isEqualTo(float expected,
FloatAssert.Delta delta)
Deprecated.
use method
instead. This method will
be removed in version 2.0. |
FloatAssert |
isGreaterThan(float other)
Verifies that the actual
Float is greater than the given one. |
FloatAssert |
isGreaterThanOrEqualTo(float other)
Verifies that the actual
Float is greater or equal to the given one. |
FloatAssert |
isLessThan(float other)
Verifies that the actual
Float is less than the given one. |
FloatAssert |
isLessThanOrEqualTo(float other)
Verifies that the actual
Float is less or equal to the given one. |
FloatAssert |
isNaN()
Verifies that the actual
Float is equal to . |
FloatAssert |
isNegative()
Verifies that the actual
Float is negative. |
FloatAssert |
isNotEqualTo(float other)
Verifies that the actual
Float is not equal to the given one. |
FloatAssert |
isPositive()
Verifies that the actual
Float is positive. |
FloatAssert |
isZero()
Verifies that the actual
Float 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 FloatAssert(float actual)
FloatAssert
.actual
- the actual value to verify.protected FloatAssert(Float actual)
FloatAssert
.actual
- the actual value to verify.public FloatAssert isEqualTo(float expected)
Float
is equal to the given one.expected
- the value to compare the actual one to.AssertionError
- if the actual Float
is not equal to the given one.@Deprecated public FloatAssert isEqualTo(float expected, FloatAssert.Delta delta)
isEqualTo(float, org.fest.assertions.Delta)
instead. This method will
be removed in version 2.0.Float
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 Float
is not equal to the given one.public FloatAssert isEqualTo(float expected, Delta delta)
Float
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 Float
is not equal to the given one.public FloatAssert isEqualTo(Float expected, Delta delta)
Float
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 Float
is not equal to the given one.public FloatAssert isNotEqualTo(float other)
Float
is not equal to the given one.other
- the given value.AssertionError
- if the actual Float
is equal to the given one.public FloatAssert isGreaterThan(float other)
Float
is greater than the given one.other
- the given value.AssertionError
- if the actual Float
is not greater than the given one.public FloatAssert isLessThan(float other)
Float
is less than the given one.other
- the given value.AssertionError
- if the actual Float
is not less than the given one.public FloatAssert isGreaterThanOrEqualTo(float other)
Float
is greater or equal to the given one.other
- the given value.AssertionError
- if the actual Float
is not greater than or equal to the given one.public FloatAssert isLessThanOrEqualTo(float other)
Float
is less or equal to the given one.other
- the given value.AssertionError
- if the actual Float
is not less than or equal to the given one.public FloatAssert isNaN()
Float
is equal to Float.NaN
.AssertionError
- if the actual Float
is not equal to NaN
.public FloatAssert isZero()
Float
is equal to zero.isZero
in interface NumberAssert
AssertionError
- if the actual Float
is not equal to zero.public FloatAssert isPositive()
Float
is positive.isPositive
in interface NumberAssert
AssertionError
- if the actual Float
is not positive.public FloatAssert isNegative()
Float
is negative.isNegative
in interface NumberAssert
AssertionError
- if the actual Float
is not negative.@Deprecated public static FloatAssert.Delta delta(float d)
Delta.delta(double)
instead. This method will be
removed in version 2.0.isEqualTo(float, org.fest.assertions.FloatAssert.Delta)
.d
- the delta value.Copyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.