Package org.mockito.internal
Class MockedStaticImpl<T>
java.lang.Object
org.mockito.internal.MockedStaticImpl<T>
- All Implemented Interfaces:
AutoCloseable
,MockedStatic<T>
,ScopedMock
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.mockito.MockedStatic
MockedStatic.Verification
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
void
void
close()
Closes this scoped mock and throws an exception if already closed.void
Releases this scoped mock and is non-operational if already released.boolean
isClosed()
Checks if this mock is closed.void
reset()
toString()
void
verify
(MockedStatic.Verification verification, VerificationMode mode) void
verify
(VerificationMode mode, MockedStatic.Verification verification) void
void
<S> OngoingStubbing<S>
when
(MockedStatic.Verification verification) SeeMockito.when(Object)
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.mockito.MockedStatic
verify
-
Field Details
-
control
-
closed
private boolean closed -
location
-
-
Constructor Details
-
MockedStaticImpl
-
-
Method Details
-
when
Description copied from interface:MockedStatic
SeeMockito.when(Object)
.- Specified by:
when
in interfaceMockedStatic<T>
-
verify
Description copied from interface:MockedStatic
- Specified by:
verify
in interfaceMockedStatic<T>
-
verify
Description copied from interface:MockedStatic
- Specified by:
verify
in interfaceMockedStatic<T>
-
reset
public void reset()Description copied from interface:MockedStatic
- Specified by:
reset
in interfaceMockedStatic<T>
-
clearInvocations
public void clearInvocations()Description copied from interface:MockedStatic
- Specified by:
clearInvocations
in interfaceMockedStatic<T>
-
verifyNoMoreInteractions
public void verifyNoMoreInteractions()Description copied from interface:MockedStatic
- Specified by:
verifyNoMoreInteractions
in interfaceMockedStatic<T>
-
verifyNoInteractions
public void verifyNoInteractions()Description copied from interface:MockedStatic
- Specified by:
verifyNoInteractions
in interfaceMockedStatic<T>
-
isClosed
public boolean isClosed()Description copied from interface:ScopedMock
Checks if this mock is closed.- Specified by:
isClosed
in interfaceScopedMock
- Returns:
true
if this mock is closed.
-
close
public void close()Description copied from interface:ScopedMock
Closes this scoped mock and throws an exception if already closed.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceScopedMock
-
closeOnDemand
public void closeOnDemand()Description copied from interface:ScopedMock
Releases this scoped mock and is non-operational if already released.- Specified by:
closeOnDemand
in interfaceScopedMock
-
assertNotClosed
private void assertNotClosed() -
toString
-