permaculture playing cards*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to test inner classes " Watch "How to test inner classes " New topic
Author

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.

thanks,
Kavitha.
Shanky Sohar
Ranch Hand

Joined: Mar 17, 2010
Posts: 1051

if the class is a inner class.you 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: http://aspose.com/file-tools
 
subject: How to test inner classes
 
Similar Threads
Refactoring the Legacy java code
private inner class and static private inner class
Private class can't have public inner?
Inner class problem
Access to Inner Class private members