Ejemplo n.º 1
0
        public void calculPrimeTest()
        {
            Commercial[] jeuxDEssai    = TableauCommerciaux();
            Commercial   unCommercial1 = jeuxDEssai[4];
            Commercial   unCommercial2 = jeuxDEssai[5];
            Commercial   unCommercial3 = jeuxDEssai[6];

            int anciennete_commercial1 = unCommercial1.donneAnciennete();
            int anciennete_commercial2 = unCommercial2.donneAnciennete();
            int anciennete_commercial3 = unCommercial3.donneAnciennete();

            double prime_accordee_attendue_commercial1 = 0;
            double prime_accordee_commercial1          = 0;

            double prime_accordee_attendue_commercial2 = 92;
            double prime_accordee_commercial2          = 0;

            double prime_accordee_attendue_commercial3 = 450;
            double prime_accordee_commercial3          = 0;

            Exercice4_Parametres_CalculRemu.Commercial.calculPrime(anciennete_commercial1, ref prime_accordee_commercial1);
            Exercice4_Parametres_CalculRemu.Commercial.calculPrime(anciennete_commercial2, ref prime_accordee_commercial2);
            Exercice4_Parametres_CalculRemu.Commercial.calculPrime(anciennete_commercial3, ref prime_accordee_commercial3);


            Assert.AreEqual(prime_accordee_attendue_commercial1, prime_accordee_commercial1);
            Assert.AreEqual(prime_accordee_attendue_commercial2, prime_accordee_commercial2);
            Assert.AreEqual(prime_accordee_attendue_commercial3, prime_accordee_commercial3);
        }
Ejemplo n.º 2
0
        public void donneAncienneteTest()
        {
            Commercial[] jeuxDEssai          = TableauCommerciaux();
            Commercial   unCommercial        = jeuxDEssai[6];
            int          anciennete_attendue = 15;
            int          anciennete          = unCommercial.donneAnciennete();

            Assert.AreEqual(anciennete_attendue, anciennete);
        }