ericcornelissen / NervousFish

An app for your :iphone: to exchange public-keys in a secure manner.
GNU Lesser General Public License v3.0
2 stars 4 forks source link

Add a powermock alternative #55

Closed jverbraeken closed 7 years ago

jverbraeken commented 7 years ago

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

-

jverbraeken commented 7 years ago

@ericcornelissen Done!