I'm trying to mock an event in WCF. I'm using AAA, which I know doesn't support events yet. I tried to follow this:
https://www.typemock.com/community/viewt ... ight=event
but it doesn't work. Here's what I'm trying to do:
Isolate.Fake.StaticMethods<OperationContext>(Members.ReturnRecursiveFakes);
OperationContext.Current.Host.Closing += this.OnHostClosing;
var host = MockManager.GetMockOf<ServiceHostBase>(
OperationContext.Current.Host);
var hostClosing = host.ExpectAddEvent("Closing");
hostClosing.Fire(OperationContext.Current.Host, EventArgs.Empty);
I get this error:
Test method TypeMock.TypeMockException: *** No handlers are registered to the event.
Any insight would be greatly appreciated.
Regards,
Jason Bock