I'm using the WCFMock to mock the WebOperationContext in my web service. The only usage is to add a custom HTTP header to the WebOperationContext.Current.OutgoingResponse.Headers collection. I'm unable to verify this using Moq. What I've already tried:
- Verify if the Add method is getting invoked. This fails because Add is not virtual
- Try to access the header directly from MockedWebOperationContext.Current. This is always zero in number
How can I verify in my unit test case that a custom header has been added?