vendredi 10 mars 2017

Good practice for writing of CRUD-testing

I want to write unit-test for CRUD-methods. But this tests have dependencies. For example, DELETE-test should be executed only after INSERT-test. Otherwise, the data will not be deleted.

I could write it all (calling CRUD-methods) in one method, but then it violates the principle of atomicity tests.

Someone knows how to do it correctly?

P.S.: If you can, please write examples with C# and EF.

Aucun commentaire:

Enregistrer un commentaire