Class PrimitiveDoubleArraySubject


  • public class PrimitiveDoubleArraySubject
    extends AbstractArraySubject<PrimitiveDoubleArraySubject,​double[]>
    A Subject to handle testing propositions for 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.
    • Constructor Detail

      • PrimitiveDoubleArraySubject

        PrimitiveDoubleArraySubject​(FailureStrategy failureStrategy,
                                    double[] o)
    • Method Detail

      • isEqualTo

        public void isEqualTo​(java.lang.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.
      • isNotEqualTo

        public void isNotEqualTo​(java.lang.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.
      • asList

        private ListSubject<?,​java.lang.Double,​java.util.List<java.lang.Double>> asList()