Mocking 3rd party callback events using moq
We've been trying write unit tests for a worker class written in C#, which mocks out a third party API (COM based) using moq to dynamically create the mock objects. NUnit is our unit testing framework. This third party component implements a couple of interfaces, but also needs to call back into our worker class using events. Our plan was to simulate the events that this 3rd party component can raise, and test that our worker class operated as expected. Unfortunately we've run into a problem in that moq seems unable to mock out and raise events that are defined externally. Unfortunately I can