java.lang.Object
org.tudalgo.algoutils.tutor.general.assertions.expected.ExpectedObjects

public final class ExpectedObjects extends Object

A collection of methods for building expected objects.

  • Method Details

    • something

      public static <T> ExpectedObject<T> something()

      Returns an expected where the actual result is not relevant.

      Type Parameters:
      T - the type of the expected object
      Returns:
      the expected
    • equalTo

      public static <T> ExpectedObject<T> equalTo(T object)

      Returns an expected object where the object is expected to be equal to the actual object.

      Type Parameters:
      T - the type of the expected object
      Parameters:
      object - the expected object
      Returns:
      the expected behavior
    • equalsFalse

      public static ExpectedObject<Boolean> equalsFalse()

      Returns an expected object where the object is expected to be Boolean.FALSE

      Returns:
      the expected behavior
    • equalsNull

      public static <T> ExpectedObject<T> equalsNull()

      Returns an expected object where the object is expected to be null.

      Returns:
      the expected behavior
    • equalsTrue

      public static ExpectedObject<Boolean> equalsTrue()

      Returns an expected object where the object is expected to be Boolean.TRUE

      Returns:
      the expected behavior
    • instanceOf

      public static <T, U extends T> ExpectedObject<Class<? extends T>> instanceOf(Class<U> type, boolean subtypes)

      Returns an expected object where the object is expected be an instance of the given type.

      Type Parameters:
      T - the type of the expected object
      Parameters:
      type - the expected type
      subtypes - if the actual object can be a subtype of the expected type
      Returns:
      the expected behavior
    • notEqualsNull

      public static <T> ExpectedObject<T> notEqualsNull()

      Returns an expected object where the object is not null.

      Type Parameters:
      T - the type of the expected object
      Returns:
      the expected behavior
    • notEqualsTo

      public static <T> ExpectedObject<T> notEqualsTo(T object)

      Returns an expected object where the object is expected to be not equal to the given object.

      Type Parameters:
      T - the type of the unexpected object
      Parameters:
      object - the unexpected object
      Returns:
      the expected behavior
    • notSameAs

      public static <T> ExpectedObject<T> notSameAs(T object)

      Returns an expected object where the object is expected to be the same as the given object.

      Returns:
      the expected behavior
    • sameAs

      public static <T> ExpectedObject<T> sameAs(T object)

      Returns an expected object where the object is expected to be the same as the given object.

      Returns:
      the expected behavior