Hi, i am using TypeMock Isolator to fake the tables on my DataContext like this:
Isolate.Swap.CallsOn(ctx.GetTable<TTable>()).WithCallsTo(content);
I now can fill the "database" with arbitrary data on each test. In order to get meaningful data for the test scenario into the DataContext i usually have to create 3-5 objects.
Now, the problem is that my business logic used the Linq-generated relation properties for example to get the customers orders. i now have to not only new up the object but i also have to connect them. Is anyone aware of some kind of solution to this problem? I spend 20 lines setting up the object graph and then testing for 5 lines. Thats kind of weird.
Thank you.