Re: [TFUI] Dialogs and EventHandlers
Anthony Williams <anthony_w.geo-/[email protected]> Mon, 07 Nov 2005 11:18:40 +0000
| Newsgroups | gmane.comp.programming.test-first-user-interfaces |
|---|---|
| Organization | Just Software Solutions Ltd |
| Message-ID | <[email protected]> |
Cory Foy <[email protected]> writes: > Recently on the NUnit list someone emailed in trying to figure out how > to test "private void" methods. Turns out they were wanting to test an > event handler that opened a FontDialog, which in turn set the font of > the form. > I'd love you have your feedback on if this would have been the approach > you would have taken and anything else I could have done differently: > > http://www.cornetdesign.com/2005/11/writing-tests-for-private-void-classes.html I just posted an entry on my blog about this, describing what I would do differently: http://www.livejournal.com/users/anthony_w/8000.html The key difference is that I believe the GetFontFromUserSelection function does not belong on the MyForm class, so I would extract it to a collaborator instead of mocking the FontDialog. Anthony -- Anthony Williams Software Developer Just Software Solutions Ltd http://www.justsoftwaresolutions.co.uk ------------------------ Yahoo! Groups Sponsor --------------------~--> Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM --------------------------------------------------------------------~-> To unsubscribe, email: TestFirstUserInterfaces-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/TestFirstUserInterfaces/ <*> To unsubscribe from this group, send an email to: TestFirstUserInterfaces-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/