¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

[TDD] RE: How do I unit test a Dispose method ?


Donaldson, John
 

¿ªÔÆÌåÓý

Yes, +1 to that.

?

I¡¯ve been wondering what the business or functional need was that was driving that particular implementation and whether it might have been done differently.

And for sure it would work out differently if you used a language that didn¡¯t ¡°dispose¡±.

?

John D.

?

From: testdrivendevelopment@... [mailto:testdrivendevelopment@...] On Behalf Of avi_a@...
Sent: 05 February 2014 08:58
To: testdrivendevelopment@...
Subject: [TDD] RE: How do I unit test a Dispose method ?

?




Hi Gishu

?

Sorry if my reply is out of context - I've been having trouble finding all the replies in the new (?) Yahoo group UI....

?

In general - the idea is the tests drive your design.

Here it sounds like you have a predefined design (a Connection wrapping your disposable SecireString member) and now you want to test iot (after the code is written).

Did I understand that correctly?

?

Either way - TDDing this would probably produce a whole different design, depending on your requirements... I'd love to give it a go - could you give some more context? as to how you ended up with this design and what the requirements are?

?

Best,

Avi

?