public void AddCallsAddFromRepository() { var testItem = OrderObjectMother.CreateOrderWithItems(1); OrderService.Add(testItem); OrderRepositoryMock.Verify(x => x.Add(testItem), Times.Once()); }
public void UpdateCallsUpdateFromRepository() { var order = OrderObjectMother.CreateEmptyOrderWithNoId(); OrderService.Add(order); order.CustomerId = 2137; OrderService.Update(order); OrderRepositoryMock.Verify(x => x.Update(order)); }
public void FindAllOfCustomerCallsFinAllOfCustomerFromRepository() { OrderService.FindAllOfCustomer(1); OrderRepositoryMock.Verify(x => x.FindAllOfCustomer(1), Times.Once()); }
public void DeleteCallsDeleteFromRepository() { OrderService.Delete(1); OrderRepositoryMock.Verify(x => x.Delete(1), Times.Once()); }
public void GetPageCallsGetOrderedPageFromRepository() { OrderService.GetPage(1, 1); OrderRepositoryMock.Verify(x => x.GetOrderedPage( 1, 1, It.IsAny <Func <Order, IComparable> >(), true), Times.Once()); }
public void FindAllCallsFindAllFromRepository() { OrderService.FindAll(); OrderRepositoryMock.Verify(x => x.FindAll(), Times.Once()); }