I'm trying to do some Moq testing against Entity Framework 4. Is there a simple way to do it, like changing the connection type on the entities? Has anyone out there done this?
Thanks
I'm trying to do some Moq testing against Entity Framework 4. Is there a simple way to do it, like changing the connection type on the entities? Has anyone out there done this?
Thanks
If you're not doing it already, you should be using the POCO template for the Entity Framework if you wish to set up proper fake objects to test against. I don't know of a walkthrough that specifically covers the Moq framework, but you should be able to get the generally idea of how to write tests for the Entity Framework using fake objects via this tutorial:
And also this video from Julie Lerman demonstrating the POCO template, which is possibly to what PsychoCoder was referring: