I have a question if I have an
attachView
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()
?