Joan Colmenero
07/04/2019, 1:44 PMattachView
and detachView
on my Presenter do I have to test these methods? Inside of the presenter I have the loadData
and I have the unit tests for this loadData
but then I have these methods and I don't know if I have to unit test those or not
And then I have a repository that does this
class CryptoListRepositoryImpl(var cryptoCurrencyService: CryptoCurrencyService) : CryptoListRepository {
override fun getResultData(): Single<CryptoResponse> {
return cryptoCurrencyService.getCryptoCurrency()
}
}
do I have to unit test this getResultData()
? (edited)
And then an use case
class GetCryptoListUseCase @Inject constructor(var cryptoListRepository: CryptoListRepository) {
fun execute(): Single<List<CryptoViewModel>> {
return cryptoListRepository.getResultData().map {
cryptoCurrencyMapper(
it
)
}
}
}
I have to Unit test the mapper
and the use case execute()
?tddmonkey
07/04/2019, 1:51 PMtddmonkey
07/04/2019, 1:51 PMcryptoCurrencyMapper
so I can’t comment on thatJoan Colmenero
07/04/2019, 1:52 PMtddmonkey
07/04/2019, 3:12 PM