Jan Cumps wrote:When you define a method of your class as private, nothing else than your class can use that method. You have restricted the access.
JUnit can't test your class, because you have forbidden JUnit to access it.
So what I am supposed to do in such a situation. Make all my methods public for testing purpose. And after the testing, change them back to private. But that is more prone to errors in two ways.
1. Some of the methods were left public after testing, which were originally private.
2. Secondly, code works fine when methods are public but problem occurs after I changed them back to private. Because of some access issue.
Kindly suggest
Abhilash