jeudi 16 avril 2015

How to test a Method with an action delegate

I have the following call:



public IEnumerable<uint> DeleteAppointment(uint appointmentId)
{
return _dataContextProvider.GetContextRW().Run(db => DeleteAppointmentById(db, appointmentId));
}


I want to test the private DeleteAppointmentById method but it isn't called of course. How can I call it?


The Run method:



void Run(Action<TDataAdapter> action)


How can it be void but still return the integer of the private function? I think I dont understand actions...


Aucun commentaire:

Enregistrer un commentaire