Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Request for test coverage #203

Open
Gelassen opened this issue Nov 10, 2021 · 0 comments
Open

Request for test coverage #203

Gelassen opened this issue Nov 10, 2021 · 0 comments

Comments

@Gelassen
Copy link

Hello,

Thanks for your work! Could you please add test coverage for common test scenarios?

I am moving from old paradigm (rxjava, model-view-presenter, etc) to a new one (data binding, view model, coroutines, etc) and looking for a right way to cover it with tests. In particular case I have screen with PagingDataAdapter and need to verify is there a call of showError() when API is set to return negative response from server.

In the past I would provide a view interface which will handle all operation on view layer within activity|fragment and mock it in the tests and call verify(view).invoke(showError()). Nowadays it looks like it is not a preferred way, PagingDataAdapter has addLoadStateListener() where, in theory, we also could provide mocks. I am working on this right now, but would like to see how Google team sees the right way to write tests for this and similar common cases.

p.s.
I have read this your legal notice , as I haven't provided any code yet I leave this paperwork for later.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant