Index

A B C D E F G H I J L M N O P R S T U V W 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form

S

10. Stubbing consecutive calls (iterator-style stubbing) - Search tag in class org.mockito.Mockito
Section
11. Stubbing with callbacks - Search tag in class org.mockito.Mockito
Section
13. Spying on real objects - Search tag in class org.mockito.Mockito
Section
20. Serializable mocks (Since 1.8.1) - Search tag in class org.mockito.Mockito
Section
30. Spying or mocking abstract classes (Since 1.10.12, further enhanced in 2.7.13 and 2.7.14) - Search tag in class org.mockito.Mockito
Section
34. Switch on or off plugins (Since 1.10.15) - Search tag in class org.mockito.Mockito
Section
5. Stubbing void methods with exceptions - Search tag in class org.mockito.Mockito
Section
53. Specifying mock maker for individual mocks (Since 4.8.0) - Search tag in class org.mockito.Mockito
Section
9. Shorthand for mocks creation - Mock annotation - Search tag in class org.mockito.Mockito
Section
same(T) - Static method in class org.mockito.ArgumentMatchers
Object argument that is the same as the given value.
ScopedMock - Interface in org.mockito
Represents a mock with a thread-local explicit scope.
serializable() - Element in annotation type org.mockito.Mock
Mock will be serializable, see MockSettings.serializable().
serializable() - Method in interface org.mockito.MockSettings
Configures the mock to be serializable.
serializable(SerializableMode) - Method in interface org.mockito.MockSettings
Configures the mock to be serializable with a specific serializable mode.
SerializableMode - Enum in org.mockito.mock
Mock serializable style.
set(Field, Object, Object) - Method in interface org.mockito.plugins.MemberAccessor
 
setMock(Object) - Method in interface org.mockito.listeners.VerificationStartedEvent
Replaces existing mock object for verification with a different one.
setStrictness(Strictness) - Method in interface org.mockito.MockitoSession
Changes the strictness of this MockitoSession.
shortThat(Matcher<Short>) - Static method in class org.mockito.hamcrest.MockitoHamcrest
Enables integrating hamcrest matchers that match primitive short arguments.
shortThat(ArgumentMatcher<Short>) - Static method in class org.mockito.ArgumentMatchers
Allows creating custom short argument matchers.
should() - Method in interface org.mockito.BDDMockito.Then
 
should(InOrder) - Method in interface org.mockito.BDDMockito.Then
 
should(InOrder, VerificationMode) - Method in interface org.mockito.BDDMockito.Then
 
should(VerificationMode) - Method in interface org.mockito.BDDMockito.Then
 
shouldHaveNoInteractions() - Method in interface org.mockito.BDDMockito.Then
 
shouldHaveNoMoreInteractions() - Method in interface org.mockito.BDDMockito.Then
 
silent() - Method in interface org.mockito.junit.MockitoRule
Rule will not report stubbing warnings during test execution.
silent() - Method in interface org.mockito.junit.MockitoTestRule
Equivalent to MockitoRule.silent().
Silent(Class<?>) - Constructor for class org.mockito.junit.MockitoJUnitRunner.Silent
 
SmartNullPointerException - Exception Class in org.mockito.exceptions.verification
 
SmartNullPointerException(String) - Constructor for exception class org.mockito.exceptions.verification.SmartNullPointerException
 
spiedInstance(Object) - Method in interface org.mockito.MockSettings
Specifies the instance to spy on.
spy(Class<T>) - Static method in class org.mockito.Mockito
Please refer to the documentation of Mockito.spy(Object).
spy(T) - Static method in class org.mockito.Mockito
Creates a spy of the real object.
spy(T...) - Static method in class org.mockito.Mockito
Please refer to the documentation of Mockito.spy(Class).
Spy - Annotation Type in org.mockito
Allows shorthand wrapping of field instances in a spy object.
StackTraceCleaner - Interface in org.mockito.exceptions.stacktrace
Decides if particular StackTraceElement is excluded from the human-readable stack trace output.
StackTraceCleaner.StackFrameMetadata - Interface in org.mockito.exceptions.stacktrace
Very similar to the StackFrame class declared on the StackWalker api.
StackTraceCleanerProvider - Interface in org.mockito.plugins
An extension point to register custom StackTraceCleaner.
startMocking() - Method in interface org.mockito.session.MockitoSessionBuilder
Starts new mocking session! Creates new MockitoSession instance to initialize the session.
startsWith(String) - Static method in class org.mockito.ArgumentMatchers
String argument that starts with the given prefix.
STATIC - Enum constant in enum org.mockito.mock.MockType
Mock replaces the mocked type through static mocking
Strict(Class<?>) - Constructor for class org.mockito.junit.MockitoJUnitRunner.Strict
 
STRICT_STUBS - Enum constant in enum org.mockito.Mock.Strictness
STRICT_STUBS - Enum constant in enum org.mockito.quality.Strictness
Ensures clean tests, reduces test code duplication, improves debuggability.
strictness() - Element in annotation type org.mockito.Mock
Mock will have custom strictness, see MockSettings.strictness(org.mockito.quality.Strictness).
strictness(Strictness) - Method in interface org.mockito.junit.MockitoRule
The strictness, especially "strict stubs" (Strictness.STRICT_STUBS) helps debugging and keeping tests clean.
strictness(Strictness) - Method in interface org.mockito.junit.MockitoTestRule
strictness(Strictness) - Method in interface org.mockito.MockSettings
Specifies strictness level for the mock.
strictness(Strictness) - Method in interface org.mockito.session.MockitoSessionBuilder
Configures strictness of MockitoSession instance.
Strictness - Enum in org.mockito.quality
Configures the "strictness" of Mockito, affecting the behavior of stubbings and verification.
StrictStubs(Class<?>) - Constructor for class org.mockito.junit.MockitoJUnitRunner.StrictStubs
 
stubbedAt() - Method in interface org.mockito.invocation.StubInfo
 
Stubber - Interface in org.mockito.stubbing
Allows to choose a method when stubbing in doThrow()|doAnswer()|doNothing()|doReturn() style
Stubbing - Interface in org.mockito.stubbing
Stubbing declared on the mock object.
StubbingLookupEvent - Interface in org.mockito.listeners
Represent an information about the looked up stubbing
StubbingLookupListener - Interface in org.mockito.listeners
When a method is called on a mock object Mockito looks up any stubbings recorded on that mock.
stubbingLookupListeners(StubbingLookupListener...) - Method in interface org.mockito.MockSettings
Add stubbing lookup listener to the mock object.
stubInfo() - Method in interface org.mockito.invocation.Invocation
 
StubInfo - Interface in org.mockito.invocation
The information about stubbing, for example the location of stubbing.
stubOnly() - Element in annotation type org.mockito.Mock
Mock will be 'stubOnly', see MockSettings.stubOnly().
stubOnly() - Method in interface org.mockito.MockSettings
A stub-only mock does not record method invocations, thus saving memory but disallowing verification of invocations.
SUBCLASS - Static variable in class org.mockito.MockMakers
Subclass mock maker which mocks types by creating subclasses.
A B C D E F G H I J L M N O P R S T U V W 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form