How can you perform the same tests as Effort using only Moq?

c# effort entity-framework-6 moq unit-testing

Question

I currently have several tests set up, including tests for the business logic layer and the data access layer, utilizing Effort (see https://effort.codeplex.com/). My employer wants to keep things simple, therefore he wants me to see if I can switch the tests from the Effort implementation to solely use Moq and FakeDbSet (see http://aikmeng.com/post/62817541825/how-to-mock-dbcontext-and-dbset-with-moq-for-unit), to make the code base easier to maintain. We have previously been using Moq in our unit tests.

I believe Effort basically emulates a full SQL Server database in memory. Therefore, it appears that using Moq to set things up so that a test can be performed using only that would require a lot of code. Any opinions on this from anyone? Is it even possible to achieve it without writing a ton of code? Anyone have any recommendations? TIA.

1
1
9/21/2015 8:51:17 PM

Accepted Answer

ZZZ_tmp
0
10/6/2015 11:17:30 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow