python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
How to mock intent using Mockito?
I am attempting to mock intent inside the function I made. Here is the function below
fun learningUnitTest(context: Context) {
val str = context.getString(R.string.app_name)
val intent = Inten...

Marfin. F
Votes: 0
Answers: 0
Using RabbitListenerTestHarness with Mockk
We want to write tests for a project that uses Spring Boot and Spring AMQP. As we code in Kotlin we would like to use MockK instead of Mockito as it better fits Kotlin code style and best practices.
T...
Rosso
Votes: 0
Answers: 1
Unit test multiple LiveData values in a ViewModel init block
Consider the following code:
sealed interface State {
object Loading : State
data class Content(val someString: String) : State
}
class SomeViewModel(getSomeStringUseCase: GetSomeStringUseCas...

dsantamaria
Votes: 0
Answers: 0
MockK: How to mock an already tested method called inside another method under test (Kotlin)
I want to test following method:
@Transactional
override suspend fun updateDebtWithoutDocumentsByUserId(userId: Long, dtoIn: DebtDTO): DebtDTO {
if (dtoIn.id == null) {
throw NotFoundExcep...
paswes
Votes: 0
Answers: 2