public class PrimitiveDoubleArraySubject extends AbstractArraySubject<PrimitiveDoubleArraySubject,double[]>
double[]
.
Note: this class deprecates some common methods because the operation of equality and
comparison on floating point numbers requires additional specification. Alternatives
equality tests are provided.Subject.HasField
failureStrategy
Constructor and Description |
---|
PrimitiveDoubleArraySubject(FailureStrategy failureStrategy,
double[] o) |
Modifier and Type | Method and Description |
---|---|
void |
isEqualTo(Object expected)
Deprecated.
|
void |
isEqualTo(Object expected,
double tolerance)
A proposition that the provided double[] is an array of the same length and type, and
contains elements such that each element in
expected is equal to each element
in the subject, and in the same position. |
void |
isNotEqualTo(Object expected)
Deprecated.
|
void |
isNotEqualTo(Object expectedArray,
double tolerance)
A proposition that the provided double[] is not an array of the same length or type, or
has at least one element that does not pass an equality test within the given tolerance.
|
protected List<Double> |
listRepresentation() |
protected String |
underlyingType() |
failWithBadType, getDisplaySubject, named
check, equals, fail, failWithBadResults, failWithCustomSubject, failWithoutSubject, failWithRawMessage, getSubject, hasField, hashCode, internalCustomName, is, isA, isNotA, isNotNull, isNull, labeled
public PrimitiveDoubleArraySubject(FailureStrategy failureStrategy, double[] o)
protected String underlyingType()
underlyingType
in class AbstractArraySubject<PrimitiveDoubleArraySubject,double[]>
protected List<Double> listRepresentation()
listRepresentation
in class AbstractArraySubject<PrimitiveDoubleArraySubject,double[]>
@Deprecated public void isEqualTo(Object expected)
isEqualTo(Object, double)
UnsupportedOperationException
.isEqualTo
in class Subject<AbstractArraySubject<PrimitiveDoubleArraySubject,double[]>,double[]>
public void isEqualTo(Object expected, double tolerance)
expected
is equal to each element
in the subject, and in the same position.@Deprecated public void isNotEqualTo(Object expected)
isNotEqualTo(Object, double)
UnsupportedOperationException
.isNotEqualTo
in class Subject<AbstractArraySubject<PrimitiveDoubleArraySubject,double[]>,double[]>
public void isNotEqualTo(Object expectedArray, double tolerance)
Copyright © 2017. All rights reserved.