I am very new to unit testing but have been using LLBLGen for almost 2 years already. I have decided to start unit testing projects for the obvious benefits that introduces.
Lets say I have implemented a call to a collection like this
// Get logs for the last 30 days
public void Fetch(int pageSize, int pageIndex, bool GetVirtualRecordCount)
{
IPredicateExpression Filter = new PredicateExpression();
Filter.Add(EventLogFields.Timestamp > DateTime.Now.AddDays(30));
EventLogs.GetMulti(Filter, 0, this.SortExpression, null, this.PrefetchPath, pageIndex, pageSize);
if (GetVirtualRecordCount)
this.VirtualRecordCount = DataHelper.GetVirtualCount(Filter, null, EventLogFields.Id);
}
I don't want to unit test LLBLGen but I would like to know if in future someone (or me) changes this call that the unit test will let them know that they have broken it.
How do other people do this?