Esempio n. 1
0
        public void donneCaMoisTest()
        {
            Commercial[] jeuxDEssai   = TableauCommerciaux();
            Commercial   unCommercial = jeuxDEssai[4];

            unCommercial.setCA(3, 50000);
            double ca_commercial         = unCommercial.donneCaMois(3);
            double ca_commercial_attendu = 50000;

            Assert.AreEqual(ca_commercial_attendu, ca_commercial);
        }
Esempio n. 2
0
        public void setCATest()
        {
            Commercial[] jeuxDEssai   = TableauCommerciaux();
            Commercial   unCommercial = jeuxDEssai[3];

            unCommercial.setCA(2, 50000);

            double ca_Attendu    = 50000;
            double ca_Commercial = unCommercial.donneCaMois(2);

            Assert.AreEqual(ca_Attendu, ca_Commercial);
        }
Esempio n. 3
0
        public void calculCommissionTest()
        {
            Commercial[] jeuxDEssai    = TableauCommerciaux();
            Commercial   unCommercial1 = jeuxDEssai[2];
            Commercial   unCommercial2 = jeuxDEssai[3];
            Commercial   unCommercial3 = jeuxDEssai[4];
            Commercial   unCommercial4 = jeuxDEssai[4];

            unCommercial1.setCA(2, 100000);
            unCommercial2.setCA(3, 300000);
            unCommercial3.setCA(4, 450000);
            unCommercial4.setCA(5, 1000000);

            double ca_du_mois_commercial1 = unCommercial1.donneCaMois(2);
            double ca_du_mois_commercial2 = unCommercial2.donneCaMois(3);
            double ca_du_mois_commercial3 = unCommercial3.donneCaMois(4);
            double ca_du_mois_commercial4 = unCommercial4.donneCaMois(5);


            double commission_Attendue_Commercial1 = 2000;
            double commission_commercial1          = Exercice4_Parametres_CalculRemu.Commercial.calculCommission(ref ca_du_mois_commercial1);

            double commission_Attendue_Commercial2 = 7000;
            double commission_commercial2          = Exercice4_Parametres_CalculRemu.Commercial.calculCommission(ref ca_du_mois_commercial2);

            double commission_Attendue_Commercial3 = 12000;
            double commission_commercial3          = Exercice4_Parametres_CalculRemu.Commercial.calculCommission(ref ca_du_mois_commercial3);

            double commission_Attendue_Commercial4 = 44000;
            double commission_commercial4          = Exercice4_Parametres_CalculRemu.Commercial.calculCommission(ref ca_du_mois_commercial4);

            Assert.AreEqual(commission_Attendue_Commercial1, commission_commercial1);
            Assert.AreEqual(commission_Attendue_Commercial2, commission_commercial2);
            Assert.AreEqual(commission_Attendue_Commercial3, commission_commercial3);
            Assert.AreEqual(commission_Attendue_Commercial4, commission_commercial4);
        }