mardi 28 avril 2015

How to unit test the saving of a collection

I am trying to write a unit test for a method that saves multiple records into a database. The method is passed a collection argument. The method loops through the collection. The userid associated with the object is set and the record is updated in the the database. This is done for every object in the collection. Any idea on how to create a unit test besides having it write to the database.

Thanks,

Aucun commentaire:

Enregistrer un commentaire