Week of September 10, 2007
This week’s Java Tip:
Javina writes: “I’m not sure if this is helpful to anyone else, but I’ve worked out a way to get around the problem of unit testing private methods with JUnit. I’d rather not simply make all the methods public because it doesn’t seem right to compromise access control for unit tests. So, I wrote the following helper method …”
Find out how this JavaWorld developer forum member has resolved the challenge of unit testing private methods and let us know whether this solution could work for you!
More discussions in the JavaWorld developer forums:
A reading guide for Java beginners
Need help with XML and RPC client/server calls
How to open Swing components on the client side
Differentiating the Service Locator and Factory pattern
Want more?
The JavaWorld developer forums: Solutions for Java developers




