Beispiel #1
0
        public void GetPrix_return_2_when_3_articles_of_1_euro_added()
        {
            var promotion = new Get_2_And_1_Offered();
            var unitPrice = 1;
            var article   = new Article(promotion)
            {
                PrixUnitaire = unitPrice, Nombre = 3
            };

            Assert.Equal(2, article.GetPrix());
        }
Beispiel #2
0
        public void GetPrix_return_price_of_4_when_take_6_items()
        {
            var promotion = new Get_2_And_1_Offered();
            var unitPrice = 1;
            var priceOf4  = unitPrice * 4;
            var article   = new Article(promotion)
            {
                PrixUnitaire = unitPrice, Nombre = 6
            };

            Assert.Equal(priceOf4, article.GetPrix());
        }