Write unit tests for your DAL using something like nunit. This can then test that the results are as expected.
How can I test database interactions in c# [closed]
-
03-06-2022 - |
Вопрос
A bit of background: I've been mostly developing in Java and Javascript for the past years and recently i've been moved to a C# project and tasked with implementing a Data Access Layer for this project. As far as i understood it this DAL will call only stored procedures (so no simple sql queries) and return some value if the stored procedure asks for it.
I apologize if this question has been answered before but i was not able to find anything useful.
What would be the best way to test that a DAL is actually calling these stored procedures and returning the results I am expecting? In Java we used Arquillian for integration tests against the DB and it worked great, however i have not been able to find anything like that for C#.
Any help will be appreciated.
Решение