How to MOLE the DataContext
-
26-12-2020 - |
Pregunta
I'm trying to figure out how to mole the datacontext so that my unit tests never hit the database.
What I want to achieve is that a datacontext is created but doesn't connect to a db and then when I call GetTable (via my repository) I return a List.AsQueryable() (that I create myself in the unit test).
Solución
Found the issue here: http://dimecasts.net/Content/WatchEpisode/170
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow