This project is read-only.

Mocking WebSocket

Oct 26, 2015 at 9:51 PM
Edited Oct 26, 2015 at 9:52 PM
Hi All,

I was wondering if anyone knew of a good way to mock the WebSocket4Net.WebSocket object.

I tend to use the Moq framework but if anyone has any other suggestions I'd be glad to hear them.

My issues is that I'm trying to unit test some code that uses a WebSocket and when the function calls the WebSocket.Send() function I get a ThreadAbortException because it can't get to an actual address.

Any help is much appreciated.