How unit test database depended on C # behavior


I have a C # application that communicates with a DB. I want to check out some functions that are database dependent. Therefore, I want to be sure that the database has an initial state before each test run. I am using NUnit to test my application. What tools are available to restore the initial state of the database?
Thanks for the help!

+3
source share
5 answers

You can use databases in SQLite database to create db test environment.

SQLite Nunit and Fluent Nhibernate - Check Data Access Level

+3
source

unit test . . (NUnit, MSTest ..) , , (, TransactionScope), . , , , .

, , , , ( ) . , , . , . .

+5

, . , , , (- ), -- .

# HashTable DB.

, (, MySQL Oracle ..) , .

+1

(), :

Rhino mocks moq

, , .

0

MbUnit . Rollback .

MbUnit , NUnit. using DLL MbUnit.

0

Source: https://habr.com/ru/post/1775574/


All Articles