public void ShipApprovedOrder() { var initialOrder = new Order(); initialOrder.Id = 1; initialOrder.Status = OrderStatus.APPROVED; _orderRepository.AddOrder(initialOrder); OrderShipmentRequest request = new OrderShipmentRequest(); request.OrderId = 1; _orderShipment.Handle(request); _orderRepository.getLastSavedOrder().Status.Should().Be(OrderStatus.SHIPPED); _inMemShipmentService.getLastShippedOrder().Should().Be(initialOrder); }
public void ApprovedExistingOrder() { var initialOrder = new Order(); initialOrder.Status = OrderStatus.CREATED; initialOrder.Id = 1; _orderRepository.AddOrder(initialOrder); var request = new OrderApprovalRequest(); request.OrderId = 1; request.Approved = true; _orderApproval.Handle(request); var savedOrder = _orderRepository.getLastSavedOrder(); savedOrder.Status.Should().Be(OrderStatus.APPROVED); }