This pull request adds the new class BaseTest to the repository that should be extended by all test classes.
Why
This PR is needed because everything is encapsulated as much as possible, while the tests do need access even to the strongly encapsulated classes.
How
The new class BaseTest uses reflection to make it easy for the programmer to invoke private constructors / methods and access private fields.
Alternative implementation
I have tried Powermock by using electro, but I couldn't get it working. I suspect it's because we're compiling using the most recent Android build tools.
Relevant Issues: -
Related Pull Requests: -
What
This pull request adds the new class BaseTest to the repository that should be extended by all test classes.
Why
This PR is needed because everything is encapsulated as much as possible, while the tests do need access even to the strongly encapsulated classes.
How
The new class BaseTest uses reflection to make it easy for the programmer to invoke private constructors / methods and access private fields.
Alternative implementation
I have tried Powermock by using electro, but I couldn't get it working. I suspect it's because we're compiling using the most recent Android build tools.
Notes
-