lundi 4 mai 2015

unit testing for Data access layer c#

i have following method wherein business layer is interacting with data access layer and returning the collection object. I am new to unit testing, but need to add automated unit tests to the solution now. I read multiple articles and theory related to unit testing, but confused with how to proceed. It would be really helpful If somebody can guide me with approach,

[DataObjectMethod(DataObjectMethodType.Select, true)]
public static WorkQueueBE GetItemByDetailsID(int detailsID)
{  return WorkQueueDB.GetItemByDetailsID(detailsID); }

This method gives call to GetItemsByDetailsID method in db layer, which in turn calls a stored proc, gets the data from database, fill the collection and returns an object.

Aucun commentaire:

Enregistrer un commentaire