Friday, April 20, 2012

Generate public accessor class for java friendly/internal package classes and internal/friendly methods

I have a package with a single public facade , with two methods , start and stop.
Because this facade is for something like a 50+ internal/friendly classes package , I need a way to be able and test several of those inner classes directly.

I am using Eclipse and JUnit.

Reflection can be a good way , but why writing all this reflection code on my own , is there a good tool that generates wrapper public classes (like .net visual studio can ) ?

Second of all , can someone please explain how to manage a dual source tree for JUnit or refer me to a good article in that topic ?
I saw several blog posts but prefer to see if someone from here has a good explanation/reference.

and , most important -- either or not to test internal classes , is not my question here , this is my design and this is how I prefer to work .
Some think you should , some think you should not , so please dont post answers such as : you should test only public thus problem solved.
I searched in stackoverflow and could not find a good thread about it.

Thank you in advance ,

James .

No comments:

Post a Comment