You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am wondering how can I implement TDD with DbContextScope. I have seen some of the methods such as Repository pattern and using Effort package. I am a beginner in TDD, so I am struggling with dependencies break down. I looked into couple of SO discussions but using moq framework seems to be an overkill ? ( as unit tests should be simple)
Thanks in advance !
The text was updated successfully, but these errors were encountered:
For unit tests, you will benefit from moq. The whole point of a unit test is to test your isolated business logic. The reason a service layer exists is because it should isolate business logic from your database stuff. As for an integration test, you can just set up your EF connection string to hit a test DB and test away. Moq your interface and instead of saving rollback every transaction.
Hi,
I am wondering how can I implement TDD with DbContextScope. I have seen some of the methods such as Repository pattern and using Effort package. I am a beginner in TDD, so I am struggling with dependencies break down. I looked into couple of SO discussions but using moq framework seems to be an overkill ? ( as unit tests should be simple)
Thanks in advance !
The text was updated successfully, but these errors were encountered: