
T - The type of mock object providedpublic class MockProvider<T> extends Object implements Provider<T>
Provider is required to provide an
object and the test case needs to provide a mock of the object.
Note that the same mock will be returned for every invocation of {get()
(it behaves as a singleton) which may impact your tests, for example
if you rely on ==. If you're using mockito, consider using the
MockProvider instead.| Constructor and Description |
|---|
MockProvider(T mock)
Construct a
Provider that will provide the mock object. |
Copyright © 2010-2014 ArcBees. All Rights Reserved.