Package org.mockito
package org.mockito
Mockito is a mock library for java - see Mockito class for for usage.
-
ClassDescriptionAdditional answers provides factory methods for less common answers.See
Matchers
for general info about matchers.Enumeration of pre-configured mock answersUse it to capture argument values for further assertions.Allows creating customized argument matchers.Behavior Driven Development style of writing tests uses //given //when //then comments as fundamental parts of your test methods.See originalOngoingStubbing
Deprecated.See originalStubber
Deprecated.not part of the public API, useBDDMockito.BDDStubber
instead.Provides fluent way of mock verification.Allows shorthandArgumentCaptor
creation on fields.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.Allow flexible verification or stubbing.Mark a field as a mock.Provides mocking information.MockitoAnnotations.initMocks(this); initializes fields annotated with Mockito annotations.Deprecated.Allows mock creation with additional mock settings.Deprecated.Instead, please useAnswer
interfaceAllows shorthand wrapping of field instances in an spy object.
BDDMockito.BDDMyOngoingStubbing
instead.