Using Moq with Entity Framework 4

I am trying to test Moq against Entity Framework 4. Is there an easy way to do this, for example, change the connection type to entities? Has anyone out there done this?

thanks

+4
source share
1 answer

If you are not already doing this, you should use the POCO template for the Entity Framework if you want to set up the right fake objects for validation. I don't know the walkthrough that specifically covers the Moq framework, but you should be able to get a general idea of ​​how to write tests for the Entity Framework using fake objects through this tutorial:

http://blogs.msdn.com/b/adonet/archive/2009/12/17/walkthrough-test-driven-development-with-the-entity-framework-4-0.aspx

And also this video from Julie Lerman, demonstrating the POCO template, which perhaps refers to what PsychoCoder talked about:

http://msdn.microsoft.com/en-us/data/ff717739

+1
source

All Articles