Unit Testing in .NET: How to Mock Entity Data Provider
-
01-07-2019 - |
Question
Does anyone know whether there's a way to mock Entity Data Provider so Unit Tests don't hit the live data? I found this blog but it seems the project hasn't been released:
http://www.chrisdoesdev.com/index.php/archives/62
Thanks
Solution
Mattwar has a great article on his blog about mocking up LinqtoSql with reflection -- perhaps you can use that as a starting point?
OTHER TIPS
I would be interested to know this myself. I don't think that it's possible, because one of the things that got the Agile/Alt.Net community in a tizzy about the Entity Framework was this very problem of the lack of persistence ignorance.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow