MockReset

Deprecated (for removal)

Since version 3.4.0

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.

Author

Phillip Webb

Since

1.4.0

Deprecated

since 3.4.0 for removal in 3.6.0 in favor of org.springframework.test.context.bean.override.mockito.MockReset

See also

Entries

Link copied to clipboard

Reset the mock before the test method runs.

Link copied to clipboard

Reset the mock after the test method runs.

Link copied to clipboard

Don't reset the mock.

Functions

Link copied to clipboard
open fun after(): MockSettings
Create settings to be used with mocks where reset should occur after each test method runs.
Link copied to clipboard
open fun apply(reset: MockReset, settings: MockSettings): MockSettings
Apply MockReset to existing settings.
Link copied to clipboard
open fun before(): MockSettings
Create settings to be used with mocks where reset should occur before each test method runs.
Link copied to clipboard
open fun valueOf(name: String): MockReset

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.)

Link copied to clipboard
open fun values(): Array<MockReset>

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.

Link copied to clipboard
open fun withSettings(reset: MockReset): MockSettings
Create settings to be used with mocks where a specific reset should occur.