public void DiscountWithoutRanges_ShouldReturnDiscountValue() { _discountMock.SetupGet(m => m.DiscountValue).Returns(123); _discountMock.SetupGet(m => m.Ranges).Returns(new List <Range>()); var actual = _discountCalculationService.RangedDiscountValueForOrder(_discountMock.Object, _orderInfo); Assert.AreEqual(123, actual); }
public void DiscountWithoutRanges_ShouldReturnDiscountValue() { _discountMock.SetupGet(m => m.DiscountValue).Returns(123); _discountMock.SetupGet(m => m.Ranges).Returns(new List <Range>()); var actual = _discountCalculationService.RangedDiscountValueForOrder(_discountMock.Object, _orderInfo); _orderServiceMock.Verify(m => m.GetApplicableOrderLines(_orderInfo, It.IsAny <List <int> >()), Times.Never()); Assert.AreEqual(123, actual); }