I\'m trying to mock out the System.net.Sockets.Socket class in C# - I tried using NUnit mocks but it can\'t mock concrete classes. I also tried using Rhino Mocks but it see
You'd better to create an interface and mock it in your test, and implement a wrapper class in your code, that forward all method calls to .NET socket as thinkzig said. Look at this link, it's same issue: How do you mock out the file system in C# for unit testing?