So I have some SMTP stuff in my code and I am trying to unit test that method.
So I been trying to Mockup MailMessage but it never seems to work. I think none of the met
disclaimer: I work at Typemock Instead of finding some hack you can use Typemock Isolator to simply fake that class in only one line of code:
var fakeMailMessage = Isolate.Fake.Instance();
Then you can set behavior on it using Isolate.WhenCalled