2

I think this question is not a duplicate of the linked question: How to test a private constructor in Java application?

This question is about testing that a private constructor does not get called (because the class only has static methods) but the linked question is about how to test private methods.

It may be that those who marked it as a duplicate have overseen that small but important difference.

3
  • Just re-opened (it still says "Possible Duplicate", but it's probably not a bad thing to leave that link one way or another).
    – Bruno
    Commented Jul 27, 2014 at 13:09
  • @Bruno The two question refer to two complete different problems. The one asks who to call a private method in the test and the other how to test that the constructor is never called. It's confusing and not helpful to see those questions linked.
    – Jimmy T.
    Commented Jul 27, 2014 at 14:55
  • One of the answers on the other question talks about constructors, so it could be of interest, I suppose. I've just rolled back the change.
    – Bruno
    Commented Jul 27, 2014 at 14:59

0

You must log in to answer this question.

Browse other questions tagged .