public void AddCallsAddFromRepository() { var testItem = CustomerObjectMother.CreateCustomer(1); CustomerService.Add(testItem); CustomerRepositoryMock.Verify(x => x.Add(testItem), Times.Once()); }
public void UpdateCallsUpdateFromRepository() { var customer = CustomerObjectMother.CreateCustomerWithNoId(); CustomerService.Add(customer); customer.Name = "New name"; CustomerService.Update(customer); CustomerRepositoryMock.Verify(x => x.Update(customer)); }
public void DeleteCallsDeleteFromRepository() { CustomerService.Delete(1); CustomerRepositoryMock.Verify(x => x.Delete(1), Times.Once()); }
public void GetPageCallsGetOrderedPageFromRepository() { CustomerService.GetPage(1, 1); CustomerRepositoryMock.Verify(x => x.GetOrderedPage( 1, 1, It.IsAny <Func <Customer, IComparable> >(), true), Times.Once()); }
public void FindAllCallsFindAllFromRepository() { CustomerService.FindAll(); CustomerRepositoryMock.Verify(x => x.FindAll(), Times.Once()); }