public void ApplyTwoInOneAndOneEuroless_WhenThereAreTwoOrMuchVouchersAndThreeOrMoreTshirts() { this.shoppingBasketDtoMock.Setup(s => s.Products).Returns(TestsServices.CreateListWithThreeVouchersAndThreeTshirts()); ShoppingBasketService sut = new ShoppingBasketService(shoppingBasketDtoMock.Object, mapperServiceMock.Object, efDbSetWrapper.Object, efDbContextSaveChanges.Object); //act var result = sut.GetTotalPrice() - sut.ApplyDiscountVoucher() - sut.ApplyDiscountTshirt(); //assert Assert.AreEqual(74.5, result); }
public void NotApplyOneEuroLess_WhenThereAreLessOfThreeTshirts() { //arrange shoppingBasketDtoMock.Setup(s => s.Products).Returns(TestsServices.CreateListWithTwoTshirts()); ShoppingBasketService sut = new ShoppingBasketService(shoppingBasketDtoMock.Object, mapperServiceMock.Object, efDbSetWrapper.Object, efDbContextSaveChanges.Object); //act var result = sut.GetTotalPrice() - sut.ApplyDiscountVoucher() - sut.ApplyDiscountTshirt(); //assert Assert.AreEqual(57.5, result); }