views:

35

answers:

0

I'm writing some code that integrates pretty tightly with lots of internal and sealed classes inside of System.Data ( like DbDataRecord and ObjectStateEntry ) for an EntityFramework project I'm working on. Of course the mocking frameworks fall to pieces trying to mock these things.

I still need to test these objects and AFAIK my only two options are:

  1. Buying TypeMock

  2. Using the decorator pattern to make my own mockable sub classes of these objects.

Decorators seem like the "cheap" and easy choice. Is there a third or fourth choice to mock these objects?