For my JUnit-tests I'm using frameworks like Hamcrest and Mockito but none of them give me Matchers or something like this to test private constructors.
I know there a ways to test this like descriped here:
- http://wiki.ivonet.nl/display/JAVA/JUnit+test+private+constructors
- How to test a private constructor in Java application?
- How to add test coverage to a private constructor?
But I have more then one class with private constructors, so I don't want to duplicate code. Before I write my own testtools I wanna ask if there is any framework which can test my private constructors and test the class has no other constructor etc.
[UPDATE]
- Found http://javadoc.jenkins-ci.org/org/jvnet/hudson/test/JenkinsMatchers.html but its not jenkins tasks to provide testtools.