I have been through this question on SO regarding unit testing private methods and fields and this answer says that it can be done via reflection mechanism . But there is a commnent saying that it would fail miserably in case of obfuscation .Why is it so ?
Obfuscation works by replacing symbol names (method, field ..) with difficult to read names. So after de-compiling you get a java files, you get a really useless java code.
The method name would have changed, so finding via reflection will not work. (unless the test code uses reflection with obfuscated method name- not an easy job )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With