Class ThreadSafeMockingProgress
java.lang.Object
org.mockito.internal.progress.ThreadSafeMockingProgress
Provides access to the
MockingProgress of a corresponding Thread. Every Thread in Mockito has it s own MockingProgress to avoid data races while stubbing.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final MockingProgressReturns theMockingProgressfor the current Thread.
-
Field Details
-
MOCKING_PROGRESS_PROVIDER
-
-
Constructor Details
-
ThreadSafeMockingProgress
private ThreadSafeMockingProgress()
-
-
Method Details
-
mockingProgress
Returns theMockingProgressfor the current Thread.IMPORTANT: Never assign and access the returned
MockingProgressto an instance or static field. Thread safety can not be guaranteed in this case, cause the Thread that wrote the field might not be the same that read it. In other words multiple threads will access the sameMockingProgress.- Returns:
- never
null
-