示例#1
0
        public void CommandeQuantiteRabais()
        {
            var commande = new Commande();

            foreach (var p in Produits)
            {
                commande.AjouterProduit(p);
            }
            commande.AppliquerCouponRabais("HP", 1);
            Assert.True(commande.ProduitRabais.Count() == 1);
        }
示例#2
0
        public void CommandeValid()
        {
            var commande = new Commande();

            foreach (var p in Produits)
            {
                commande.AjouterProduit(p);
            }

            commande.AppliquerCouponRabais("HP", 1);
            Assert.True(commande.Valid);
        }
示例#3
0
        public void CommandeVerifierTotales()
        {
            var commande = new Commande();

            foreach (var p in Produits)
            {
                commande.AjouterProduit(p);
            }
            commande.AppliquerCouponRabais("HP", 1);

            var totalAvecRebais = commande.getTotalAvecCouponRabais();
            var total           = commande.getTotal();

            Assert.True(total > totalAvecRebais);
        }