Derik Whittaker

Syndication

News


Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
Handling Events in Unit Tests with anonymous delegates

Recently a co-worker of mine (Lou, smart guy… (Lou, your shameless plug)) needed to test a UI control that raised an event upon certain conditions.  In order to handle this event he needed to have some way to trap that it was raised.  

The solution he came up with was simple and elegant.., use an anonymous delegate.

Here is an example

I thought this was pretty cool.

Thanks Lou.....:)

 


Posted 04-23-2007 12:26 PM by Derik Whittaker
Filed under: , ,

[Advertisement]

Comments

Interesting finding - 04/25/2007 « Another .NET Blog wrote Interesting finding - 04/25/2007 « Another .NET Blog
on 04-26-2007 3:58 PM

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco
NServiceBus
RavenDb
Web Sequence Diagrams
Ducksboard<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)