Class ComparesEqualTo<T extends java.lang.Comparable<? super T>>

  • All Implemented Interfaces:
    Quality<T>

    public final class ComparesEqualTo<T extends java.lang.Comparable<? super T>>
    extends QualityComposition<T>
    • Constructor Summary

      Constructors 
      Constructor Description
      ComparesEqualTo​(T expected)
      Creates Quality that matches if the Comparable value under test is equal to the given value.
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ComparesEqualTo

        public ComparesEqualTo​(T expected)
        Creates Quality that matches if the Comparable value under test is equal to the given value.

        Example

             assertThat(1, comparesEqualTo(1));