Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • Well, I really want to test my "contract" which is defined in the interface. If my Impl happen to have some public method that is not exposed through the interface, for me it is like private method and I tend to ignore it. Commented Jun 7, 2012 at 17:55
  • But what fulfills the "contract"? The Impl, right? So that's what you test. What would it even look like to test just the interface? You can't instantiate an interface. Commented Jun 7, 2012 at 18:31
  • I've opened new question about this issue stackoverflow.com/questions/10937763/… Commented Jun 7, 2012 at 18:40
  • OK, it's clear from your other question that we were just confusing each other with vocabulary or something. Of course the instance you are testing is the Impl, but do you declare it as the interface or the Impl? I think that is context specific, but it's certainly less nonsensical than what I had thought you were asking originally. Commented Jun 7, 2012 at 21:46