Exemplo n.º 1
0
        public void AddCallsAddFromRepository()
        {
            var testItem = ShipmentObjectMother.CreateShipment(1);

            ShipmentService.Add(testItem);
            ShipmentRepositoryMock.Verify(x => x.Add(testItem), Times.Once());
        }
Exemplo n.º 2
0
        public void UpdateCallsUpdateFromRepository()
        {
            var shipment = ShipmentObjectMother.CreateShipmentWithNoId();

            ShipmentService.Add(shipment);
            shipment.Status = ShipmentStatus.Delivered;
            ShipmentService.Update(shipment);
            ShipmentRepositoryMock.Verify(x => x.Update(shipment));
        }
Exemplo n.º 3
0
 public void DeleteCallsDeleteFromRepository()
 {
     ShipmentService.Delete(1);
     ShipmentRepositoryMock.Verify(x => x.Delete(1), Times.Once());
 }
Exemplo n.º 4
0
 public void GetPageCallsGetOrderedPageFromRepository()
 {
     ShipmentService.GetPage(1, 1);
     ShipmentRepositoryMock.Verify(x => x.GetOrderedPage(
                                       1, 1, It.IsAny <Func <Shipment, IComparable> >(), true), Times.Once());
 }
Exemplo n.º 5
0
 public void FindAllCallsFindAllFromRepository()
 {
     ShipmentService.FindAll();
     ShipmentRepositoryMock.Verify(x => x.FindAll(), Times.Once());
 }