How to test Extension Methods?

Coordinator
May 21, 2011 at 3:33 PM
Edited May 21, 2011 at 3:36 PM

I tried to create an dynamic proxy (http://www.codeproject.com/KB/cs/dynamicproxy.aspx) over the class under test... No lucky...

When we have an instance method with the same signature than an extension method, looks like if the compiler invokes the extension method... :(

Googling and reading about: http://www.google.com.br/search?q=unit+test+extension+methods, but didn't found an good solution yet... Someone?

Coordinator
Sep 19, 2011 at 5:21 PM
Edited Sep 19, 2011 at 5:22 PM

Hi André,

googling for a solution, i found this article, http://blogs.clariusconsulting.net/kzu/how-to-mock-extension-methods/.

I'll try to make some tests and help you in this battle...

[]s, Pierre Noronha