Exemplo n.º 1
0
        public void Wear_ShouldBeHalfBasePrice_WhenIsSetSaleState(
            string name,
            double basePrice,
            double finalPrice)
        {
            //Arrange
            var sale = new Sale();
            var wear = new Wear(name, basePrice);

            //Act
            wear.SetState(sale);

            //Assert
            wear.GetPrice().Should().Be(finalPrice);
        }
Exemplo n.º 2
0
        public void Wear_ShouldBeBasePriceLessDiscount_WhenIsSetPromotionState(
            string name,
            double basePrice,
            double discount,
            double finalPrice)
        {
            //Arrange
            var promotion = new Promotion(discount);
            var wear      = new Wear(name, basePrice);

            //Act
            wear.SetState(promotion);

            //Assert
            wear.GetPrice().Should().Be(finalPrice);
        }