mirror of
https://github.com/VibedByKaKi/orgzly-android-revived.git
synced 2026-10-11 21:01:20 +02:00
Create a generic test suite for SyncRepo implementations in the "shared-test" library. This allows writing "abstract" test cases which all implementations must pass. The main challenge in creating these "abstract" tests for SyncRepo was that most implementations can be tested with local unit tests, whereas DocumentRepo requires instrumented tests, since the Android class DocumentFile is so central to it. I tried several different approaches, but ended up with this separate "shared-test" library, containing an abstract class SyncRepoTest, which helps you by defining all the test cases and contains all their inner logic. I have also tried keeping all the tests as instrumented tests, but I wanted to launch a lightweight WebDAV server for those tests, and it was not possible to get that to work in Android. The WebDAV server was also the reason why I switched from Java 11 to Java 17 in the build process. But that was due, anyway, as Java 11 is now old and unsupported.
1 line
No EOL
6 B
Text
1 line
No EOL
6 B
Text
/build |