public void SetTaxesService_SetTax_ShouldNotProceedWithSettingTaxIfTaxValueIsProvided() { var order = new Order() { Total = 10 }; _setTaxes.SetTax(ref order, 5); A.CallTo(() => _setTaxDetails.SetOrderLinesTaxes(ref order)).MustNotHaveHappened(); A.CallTo(() => _setTaxDetails.SetShippingTaxes(ref order)).MustNotHaveHappened(); }
public Ecommerce.Entities.Orders.Order GetOrder(AmazonOrder amazonOrder) { Ecommerce.Entities.Orders.Order order = amazonOrder.Order ?? new Ecommerce.Entities.Orders.Order(); if (order.Id == 0) { order = GetOrderDetails(amazonOrder); Ecommerce.Entities.Orders.Order order1 = order; _session.Transact(session => session.Save(order1)); GetOrderLines(amazonOrder, ref order); _setTax.SetTax(ref order, amazonOrder.Tax); } order.ShippingStatus = amazonOrder.Status.GetEnumByValue <ShippingStatus>(); return(order); }