Hi, does anyone know if there is any library to te...
# android
b
Hi, does anyone know if there is any library to test Paging 3? The only library I've found is "androidx.paging:paging-common" but there is literally 0 information, guide or documentation for it, does anyone know if they finally implemented any testing library for Paging 3?
d
What are you interested in asserting more precisely?
b
Like for example i have complex RemoteMediator class that should be tested, but i have 0 access to values, and the only thing that is possible is to verify that some methods from services were invoked, but it's hard to do because every single thingy like PagingState needs to be mocked to even run it, it's like the worst library to be tested 😅
d
well, by values do you mean items presented by adapter? I would probably try to test the adapter bits independently from RemoteMediator because RemoteMediator is more like a callback and doesn't actually directly contribute to what adapter will show
in terms of mocking / faking, you should probably be writing mocks for the things RemoteMediator depends on and not the actual args you're passing into it
If you want to share your test though, I can try to help you figure out how to achieve what you're trying to do