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
Hello, I have this function:
override fun loadSensors(userId: String, param: (Result<MutableList<UserSensor>>) -> Unit) { // Blank }
@get:Rule var hiltRule = HiltAndroidRule(this) @Rule @JvmField var mockitoRule = MockitoJUnit.rule() @Inject lateinit var repository: MockRepositoryImpl @Before fun before() { hiltRule.inject() MockitoAnnotations.openMocks(this) `when`(repository.loadSensors(anyString(), any())).thenAnswer { Result.Success("", mutableListOf(UserSensor(0), UserSensor(1))) } ActivityScenario.launch(MainActivity::class.java) }
How to mock that thenAnswer would actually call my param argument?
thenAnswer
param
The text was updated successfully, but these errors were encountered:
Are you asking about InvocationOnMock?
InvocationOnMock
Sorry, something went wrong.
No branches or pull requests
Hello, I have this function:
How to mock that
thenAnswer
would actually call myparam
argument?The text was updated successfully, but these errors were encountered: