We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@Mock lateinit var reactiveLocationProvider: ReactiveLocationProvider @Mock lateinit var prefs: Preferences @Mock private lateinit var location: Location @Before fun setUp() { initMocks(this) locationProvider = LocationProviderImpl(reactiveLocationProvider, prefs) given(location.latitude).willReturn(FAKE_LATITUDE) given(location.longitude).willReturn(FAKE_LONGITUDE) }
Getting this error
org.mockito.exceptions.base.MockitoException: Mockito cannot mock this class: class pl.charmas.android.reactivelocation2.ReactiveLocationProvider.
Using Mockito 2.23.0 Any solutions?
The text was updated successfully, but these errors were encountered:
A workaround is to add the following dependency to the testImplementation configuration.
testImplementation
// hacks to get ReactiveLocationProvider to mock testImplementation "com.google.android.gms:play-services-places:17.0.0"
It provides the missing class references from ReactiveLocationProvider.
Sorry, something went wrong.
No branches or pull requests
Getting this error
Using Mockito 2.23.0
Any solutions?
The text was updated successfully, but these errors were encountered: