views:

118

answers:

2

Typemock can do this but it is $799USD and that is a lot to pay for two features.

Please no conversations about avoiding using static and sealed things or encapsulating them. When using a large 3rd party API it is not possible and/or practical.

Thanks

A: 

The only thing I could find was: http://research.microsoft.com/en-us/projects/stubs/

I admit to having not used it, but I thought yourself and others may find the link useful.

Lee
+1  A: 

Not really, but you can use Moq Moq Download or Rhino Mocks Rhino Mocks Download to wrap the static method and call in a virtual instance method in another class

http://stackoverflow.com/questions/540239/mocking-static-methods-using-rhino-mocks

Sara
i regularly use this for the occasional case but the API I am dealing with at the moment has a very large surface area and it would be a pain to take this aproach.Thanks anyway.
Simon