I'm writing some unit tests, to make sure that my windows forms code
works properly after refactoring, and I've bumped into a problem -
Messagebox.show.
There are a couple of places where my code pops up a messagebox to
inform the user of what's going on, and if this happens during a unit
test then it requires the user to click on the button before it can
finish the test. Which isn't much use for, say, unattended automatic
testing.
Is there any way to intercept a Messagebox call and fake it being
clicked? Or is there some other way that I should approach this?
Cheers,
Andy D