Skip to content

Added tests for multiple repositories providing same apks

Right now, multi repo support works, but is kinda funky. While fixing #324 (closed), I accidentally broke this support without realising it. So in the interests of making my approach to #324 (closed) more test driven, I've written some tests for multi repo support.

Initially I wrote tests for the actual correct, desirable behaviour. Then when it became apparant that we dont' do this, I commented those tests out (but left them there for hopefully future multi-repo work) and then added tests for the current behaviour to make sure we don't introduce regressions.

Android unit testing framework is nice for testing content providers. It is nice for testing file handling. However I really struggled to get it working with both. Had to do some interesting things with instrumentation and contexts in order to get it to work.

I'm sure Android has nice Service testing capabilities too. But given the trouble with instrumentation/contexts/files/providers/etc, it was easier for me to refactor the parts of UpdateService that I needed to test into a separate, testable class.

Merge request reports