Skip to main content
3 events
when toggle format what by license comment
Jul 2, 2018 at 10:18 comment added Phill W. Test methods have the ability to access private methods; with Reflection, anything is possible. I see this question more about the [un]desirability of doing so.
Jun 29, 2018 at 10:45 comment added Theraot Note that the question is about the test methods, and not the methods in the system under test. While it is true that OP argues that you can use reflection to test things "less" than public, it is an argument about the ability of test frameworks to access private methods. The test framework has to use reflection to find the test methods (that are marked by an attribute), and thus must use reflection, with that in mind... "why do I need to make all my unit test methods public?"
Jun 29, 2018 at 10:17 history answered Phill W. CC BY-SA 4.0