Enum MockType

java.lang.Object
java.lang.Enum<MockType>
org.mockito.mock.MockType
All Implemented Interfaces:
Serializable, Comparable<MockType>, java.lang.constant.Constable

public enum MockType extends Enum<MockType>
The type of mock being created
  • Enum Constant Details

    • INSTANCE

      public static final MockType INSTANCE
      Mock created as an instance of the mocked type
    • STATIC

      public static final MockType STATIC
      Mock replaces the mocked type through static mocking
  • Method Details

    • values

      public static MockType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static MockType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null