The moose likes Java in General and the fly likes How to test inner classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to test inner classes " Watch "How to test inner classes " New topic

How to test inner classes

Kavita Shivani
Ranch Hand

Joined: Aug 14, 2009
Posts: 45
Hi everyone,

I wanted to know what is the general approach inner classes. In my project, I have an inner class that is private. As of now, I am fixing a defect and so for debug purpose planning to make it public class and test the method I needed to and once i figure out the issue, I am planning to make the class private and keep it that way. But i wanted to if there is a better approach and if I am missing it.

Shanky Sohar
Ranch Hand

Joined: Mar 17, 2010
Posts: 1051

if the class is a inner cannot access it outside without the instance of outer class even if you make it public.

SCJP6.0,My blog Ranchers from Delhi
I agree. Here's the link:
subject: How to test inner classes
It's not a secret anymore!