open class PowerMockitoFieldPreparer : FieldPreparer
A FieldPreparer for Powermock + Mockito. Powermock doesn't seem to offer a nice way to init mocks on an arbitrary object that isn't the testClass (and the runner/rule deals with those). So to handle testResources, we use this custom FieldPreparer that expects some mocks/spies to already be initialized (and doesn't touch those). We use PowerMockito#mock(Class)
to create mocks and Mockito#spy(Object)
/Mockito#spy(Class)
to create spies.
PowerMockitoFieldPreparer()
A FieldPreparer for Powermock + Mockito. Powermock doesn't seem to offer a nice way to init mocks on an arbitrary object that isn't the testClass (and the runner/rule deals with those). So to handle testResources, we use this custom FieldPreparer that expects some mocks/spies to already be initialized (and doesn't touch those). We use |
open fun prepareFields(objectWithMockFields: Any): Unit |