I am just starting to do unit testing
I use the following method
DataRepository.CommandesKitFaussesPortesVitresProvider.GetByCkfpId(pCommandesKitFaussesPortes.Id)
to return a list of objects
public Commande.Entities.TList<Commande.Entities.CommandesKitFaussesPortesVitres > GetByCkfpId(int _ckfpId) {
int num = -1;
return this.GetByCkfpId(_ckfpId, 0, 0x7fffffff, out num);
}
I want to mock this and return a simple list i can leave empty or put in some objects...
I dont know if its because those are static
public static Commande.Data.Bases.CommandesKitFaussesPortesVitresProviderBase CommandesKitFaussesPortesVitresProvider
{
get
{
DataRepository.LoadProviders();
return DataRepository._provider.CommandesKitFaussesPortesVitresProvider;
}
}
but i cant find the proper syntax to mock the behavior