Exemplo n.º 1
0
        public void GetNbRetardsMotifTest()
        {
            Etudiant et1 = new Etudiant(1, "Enzo");
            Etudiant et2 = new Etudiant(2, "Noa");

            Motif motif1 = new Motif(1, "Malade grippe");
            Motif motif2 = new Motif(2, "Pas envie");

            Retard retard1 = new Retard(1, DateTime.Now.ToShortDateString(), motif1, false);
            Retard retard2 = new Retard(2, DateTime.Now.ToShortDateString(), motif2, true);

            et1.AjouterRetard(retard1); et1.AjouterRetard(retard2);

            Assert.AreEqual(1, et1.GetNbRetardsMotif(motif1));
        }