chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
Welcome to Typemock Community! Here you can ask and receive answers from other community members. If you liked or disliked an answer or thread: react with an up- or downvote.
0 votes
Then I have no really easy way to mock what is going on in here. The generated code provides a concrete class without an interface, so it is very hard to mock, and naturally, System.Data.Linq.Table<T> is sealed, has internal stuff, and is utterly hostile to mocking. ... r-SQL.aspx

Any comments?
asked by krok (3.9k points)

2 Answers

0 votes
Hi Arnulf,

Typemock Isolator 4.2 (and up) supports many of the .Net 3.5 features, includng the ability to mock LINQ queries.
Take a look at the user guide:

It's right there at the end. 8)
answered by gilz (14.5k points)
0 votes
Hi Arnulf,

That is actually a very good question.

Unlike many other mocking framework out there (including Rhino).
The Isolator has no inherent limitation and can mock virtually anything.

Specifically, the Isolator can mock concrete classes as well as Interfaces, and it can mock static methods as well as instance methods.

In short as Gil mentioned we already support most of the new features Microsoft released as part of the .NET 3.5 framework including LINQ. :)

:idea: There are several good articles out there on how to Mock LINQ using the Isolator here are two of them:
Mocking LINQ Queries, Extension methods and Anonymous Types
How To Unit Test - Linq to SQL and Mocking
answered by lior (13.2k points)