Esempio n. 1
0
        public void compareToTest2()
        {
            Prestation unePrestation      = new Prestation("XX", new DateTime(2015, 9, 10, 12, 0, 0), new Intervenant("Dupont", "Jean"));
            Prestation uneAutrePrestation = new Prestation("XX", new DateTime(2015, 11, 10, 12, 0, 0), new Intervenant("Dupont", "Jean"));

            Assert.AreEqual(1, unePrestation.compareTo(uneAutrePrestation), "La somme doit être égal à 1");
        }
        public void CompareToTestEstInferieur()
        {
            Prestation unePrestation      = new Prestation("XX", new DateTime(2015, 9, 4, 12, 0, 0), new Intervenant("Dupont", "Jean"));
            Prestation uneAutrePrestation = new Prestation("XX", new DateTime(2015, 9, 10, 12, 0, 0), new Intervenant("Dupont", "Jean"));

            Assert.AreEqual(-1, unePrestation.compareTo(uneAutrePrestation));
        }