Class BasicTestOfObject<T>

java.lang.Object
org.tudalgo.algoutils.tutor.general.assertions.basic.BasicTest<TestOfObject<T>,ExpectedObject<T>,ResultOfObject<T>,ActualObject<T>>
org.tudalgo.algoutils.tutor.general.assertions.basic.BasicTestOfObject<T>
Type Parameters:
T - the type of object under test
All Implemented Interfaces:
Test<TestOfObject<T>,ExpectedObject<T>,ResultOfObject<T>,ActualObject<T>>, TestOfObject<T>

public class BasicTestOfObject<T> extends BasicTest<TestOfObject<T>,ExpectedObject<T>,ResultOfObject<T>,ActualObject<T>> implements TestOfObject<T>

A basic implementation of a test of an object.

  • Constructor Details

    • BasicTestOfObject

      public BasicTestOfObject(Environment environment, ExpectedObject<T> expected)

      Constructs a new test of an object with the given environment and expected object.

      Parameters:
      environment - the environment
      expected - the expected object
  • Method Details

    • run

      public ResultOfObject<T> run(ObjectCallable<T> callable)
      Description copied from interface: TestOfObject

      Tests if the object retrieved by the given callable is as expected and returns the result.

      Specified by:
      run in interface TestOfObject<T>
      Parameters:
      callable - the callable
      Returns:
      the result of the test