Mocking a Linq2Sql DataContext

Viewed 7622

I have a Lin2Sql DataContext that I am using to get all my data from a sql database however I am struggling to find a way to successfully Mock this so that I can create relevant Unit Tests.

In my data access objects that I am wanting to test I am refreshing the context each time and I am finding it difficult to find a simple suitable way to mock this.

Any help with this matter will be greatly appreciated.

3 Answers
Related