Class TestDoubles

java.lang.Object
org.dmfs.jems2.mockito.doubles.TestDoubles

public abstract class TestDoubles extends Object
Static factory methods for creating test doubles.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> T
    dummy(Class<T> clazz)
    Creates a 'dummy' object of the provided class, i.e. a test-double that is only used as a 'placeholder' instance for some argument.
    static <T> T
    failingMock(Class<T> clazz)
    Creates a mock for the provided class that fails on every method call by default.

    Methods inherited from class java.lang.Object

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

    • TestDoubles

      public TestDoubles()
  • Method Details

    • dummy

      public static <T> T dummy(Class<T> clazz)
      Creates a 'dummy' object of the provided class, i.e. a test-double that is only used as a 'placeholder' instance for some argument.
    • failingMock

      public static <T> T failingMock(Class<T> clazz)
      Creates a mock for the provided class that fails on every method call by default.