Browsing All Posts published in »2009«

Raising events in NMock

March 4, 2009

0

It is actually pretty easy to raise events using the latest release of NMock. You can basically use Expect.Once.On(bla).EventAdd(“SomeEvent”, Is.Anything) to specify that you expect an event handler to be added for “SomeEvent” event on bla object and fire that event using Fire.Event(“SomeEvent”). Here’s an example, minus any domain noise, that demonstrates the whole thing.

Interfaces and partial classes

February 13, 2009

0

What will happen when the following piece of code is compiled? Options: Compiler error. “Moved” will be printed.

Follow

Get every new post delivered to your Inbox.