public class Doubles extends RealNumbers<Double>
Double
s.Constructor and Description |
---|
Doubles(ComparisonStrategy comparisonStrategy) |
Modifier and Type | Method and Description |
---|---|
void |
assertEqual(AssertionInfo info,
Double actual,
Double expected,
Offset<Double> offset)
Verifies that two floats are equal within a positive offset.
It does not rely on the custom comparisonStrategy (if one is set) because using an offset is already a specific comparison strategy. |
void |
assertIsCloseTo(WritableAssertionInfo info,
Double actual,
double other,
Offset<Double> offset) |
static Doubles |
instance()
Returns the singleton instance of this class based on
StandardComparisonStrategy . |
protected boolean |
isEqualTo(Double actual,
Double expected,
Offset<?> offset)
Returns true if the two floats parameter are equal within a positive offset, false otherwise.
It does not rely on the custom comparisonStrategy (if one is set) because using an offset is already a specific comparison strategy. |
protected Double |
NaN() |
protected Double |
zero() |
assertIsNaN, assertIsNotNaN
assertIsBetween, assertIsNegative, assertIsNotNegative, assertIsNotPositive, assertIsNotZero, assertIsPositive, assertIsStrictlyBetween, assertIsZero
areEqual, assertEqual, assertEqualByComparison, assertGreaterThan, assertGreaterThanOrEqualTo, assertIsBetween, assertLessThan, assertLessThanOrEqualTo, assertNotEqual, assertNotEqualByComparison, assertNotNull, getComparator
public Doubles(ComparisonStrategy comparisonStrategy)
public static Doubles instance()
StandardComparisonStrategy
.StandardComparisonStrategy
.protected Double NaN()
NaN
in class RealNumbers<Double>
public void assertEqual(AssertionInfo info, Double actual, Double expected, Offset<Double> offset)
info
- contains information about the assertion.actual
- the actual value.expected
- the expected value.offset
- the given positive offset.NullPointerException
- if the given offset is null
.AssertionError
- if the actual value is null
.AssertionError
- if the actual value is not equal to the expected one.protected boolean isEqualTo(Double actual, Double expected, Offset<?> offset)
RealNumbers
isEqualTo
in class RealNumbers<Double>
actual
- the actual value.expected
- the expected value.offset
- the given positive offset.public void assertIsCloseTo(WritableAssertionInfo info, Double actual, double other, Offset<Double> offset)
Copyright © 2013-2014 AssertJ. All Rights Reserved.