I am wondering how you can work with a protected method in Junit.
Assuming I want to test class A, which has a protected member and constructor. I realized that for testing class A, I have to write another ATest class that can extend TestCase (this should be mandatory in Junit3). Since I want to test a protected method and because A has a protected constructor, my test class ATest also needs to extend the class A where this method is implemented in order to be able to create this class and access this method.
maybe double inheritance from both classes is a good solution?
PS I already knew that in Junit 4 you can avoid inheritance from TestCase.
java junit junit4 junit3
Giuseppe pes
source share