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
Matchersfor 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 originalOngoingStubbingDeprecated.See originalStubberDeprecated.not part of the public API, useBDDMockito.BDDStubberinstead.Provides fluent way of mock verification.Allows shorthandArgumentCaptorcreation 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 useAnswerinterfaceAllows shorthand wrapping of field instances in an spy object.
BDDMockito.BDDMyOngoingStubbinginstead.