Enum Class MockReset

java.lang.Object
java.lang.Enum<MockReset>
org.springframework.boot.test.mock.mockito.MockReset
All Implemented Interfaces:
Serializable, Comparable<MockReset>, Constable

@Deprecated(since="3.4.0", forRemoval=true) public enum MockReset extends Enum<MockReset>
Deprecated, for removal: This API element is subject to removal in a future version.
since 3.4.0 for removal in 3.6.0 in favor of MockReset
Reset strategy used on a mock bean. Usually applied to a mock through the @MockBean annotation but can also be directly applied to any mock in the ApplicationContext using the static methods.
Since:
1.4.0
Author:
Phillip Webb
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Reset the mock after the test method runs.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Reset the mock before the test method runs.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Don't reset the mock.
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.mockito.MockSettings
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create settings to be used with mocks where reset should occur after each test method runs.
    static org.mockito.MockSettings
    apply(MockReset reset, org.mockito.MockSettings settings)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Apply MockReset to existing settings.
    static org.mockito.MockSettings
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create settings to be used with mocks where reset should occur before each test method runs.
    static MockReset
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the enum constant of this class with the specified name.
    static MockReset[]
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns an array containing the constants of this enum class, in the order they are declared.
    static org.mockito.MockSettings
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create settings to be used with mocks where a specific reset should occur.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • BEFORE

      public static final MockReset BEFORE
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reset the mock before the test method runs.
    • AFTER

      public static final MockReset AFTER
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reset the mock after the test method runs.
    • NONE

      public static final MockReset NONE
      Deprecated, for removal: This API element is subject to removal in a future version.
      Don't reset the mock.
  • Method Details

    • values

      public static MockReset[] values()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static MockReset valueOf(String name)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • before

      public static org.mockito.MockSettings before()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create settings to be used with mocks where reset should occur before each test method runs.
      Returns:
      mock settings
    • after

      public static org.mockito.MockSettings after()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create settings to be used with mocks where reset should occur after each test method runs.
      Returns:
      mock settings
    • withSettings

      public static org.mockito.MockSettings withSettings(MockReset reset)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create settings to be used with mocks where a specific reset should occur.
      Parameters:
      reset - the reset type
      Returns:
      mock settings
    • apply

      public static org.mockito.MockSettings apply(MockReset reset, org.mockito.MockSettings settings)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Apply MockReset to existing settings.
      Parameters:
      reset - the reset type
      settings - the settings
      Returns:
      the configured settings