Package org.mockito
package org.mockito
Mockito is a mock library for java - see
Mockito
class for usage.- See Also:
-
ClassDescriptionAdditional answers provides factory methods for answers.See
ArgumentMatchers
for general info about matchers.Enumeration of pre-configured mock answersUse it to capture argument values for further assertions.Allows creating customized argument matchers.Allow flexible verification or stubbing.Behavior Driven Development style of writing tests uses //given //when //then comments as fundamental parts of your test methods.See originalOngoingStubbing
See originalStubber
Provides fluent way of mock verification.Allows shorthandArgumentCaptor
creation on fields.This annotation is not supposed to be used by Mockito end-users.Annotation representing a type that should not be mocked.The annotation conveys following information: The API is fairly new and we would appreciate your feedback.Mark a field on which injection should be performed.Allows verification in order.Mark a field as a mock.Represents a mock of any object construction of the represented type.The context for a construction mock.Functional interface that consumes a newly created mock and the mock context.MockedStatic<T>Represents an active mock of a type's static methods.Functional interface for a verification operation on a static mock.Provides mocking information.MockitoAnnotations.openMocks(this); initializes fields annotated with Mockito annotations.Mockito framework settings and lifecycle listeners, for advanced users or for integrating with other frameworks.MockitoSession
is an optional, highly recommended feature that drives writing cleaner tests by eliminating boilerplate code and adding extra validation.Constants for built-in implementations ofMockMaker
.Allows mock creation with additional mock settings.Indicates to the user that she should not provide custom implementations of given type.Represents a mock with a thread-local explicit scope.Allows shorthand wrapping of field instances in a spy object.