Hi,
In a method in presenter,I expect a method of view to be called.This method is also passed data extracted from a service method(which is not mocked).This service method basically gets data from database and returns List(using LINQ to SQL).Now, when I write this in the test
List<customers> cus = expecteddata;
view.AssertWasCalled(v => v.InitializeCustomersForSelectedCity(cus));
Rhino.Mocks.Exceptions.ExpectationViolationException: ICustomerListView.InitializeCustomersForSelectedCity(System.Collections.Generic.List`1[DAL.Customer]); Expected #1, Actual #0.
The code which I am testing in presenter
public void HandleSelectedCity(int City)
{
selectedCity = City ;
_custometListForm.InitializeCustomersForSelectedCity(_CustomerListService.GetActiveCustomersForSelectedCity(selectedCity));
}
When I ignore arguments, test works fine What could be the issue?