RE: How do I unit test a Dispose method ?

Amir Kolsky <[email protected]> Mon, 3 Feb 2014 04:19:00 +0000
Newsgroups gmane.comp.programming.test-driven-development
Message-ID <[email protected]>
Except that B must already be IDisposable. The IDisposable pattern requires that any object that owns an IDisposable must itself implement IDisposable.


*  This is inane, as it requires the owning object to know about implementation details of it's ownee.
I disagree. All that A needs to know is that B implements the IDisposable interface.

  * A has to know about something pertaining to B that has nothing to do with why A needs it.