Faking extension methods

You may also like...

3 Responses

  1. Eli Lopian says:

    Great post Dennis.
    Did you know that you don’t have to call the extension type, but can call the extension method directly on the extended type.

    // Arrange
    var dummy = new SomeType();
    Isolate.WhenCalled(() => dummy.SendTo(“”)).WillReturn(SendResult.Sent);

  2. Dennis van der Stelt says:

    Thanks Eli for the remark, added the info to the post.
    Also added a solution to download and see what’s actually happening.

  3. I have done this on several websites, however its much easier to do it in IIS…

    I make xml files act as ASP files so i can process code on the server-side and output xml.

Click on a tab to select how you'd like to leave your comment

Leave a Reply

Your email address will not be published. Required fields are marked *