public void CompareToTestV3() { Prestation unePrestation = new Prestation("XX", new DateTime(2015, 9, 10, 15, 0, 0), new Intervenant("Dupont", "Jean")); Prestation unePrestation2 = new Prestation("XX", new DateTime(2016, 9, 10, 17, 0, 0), new Intervenant("Dupont", "Jean")); Assert.AreEqual(-1, unePrestation.CompareTo(unePrestation2), "La date de la 1ere presta doit être antérieure à la date de la 2eme presta"); }
public void CompareToTest() { Prestation maPresta = new Prestation("OuiAdrienCBien", new DateTime(2015, 9, 6, 12, 0, 0), new Intervenant("Adry1", "Dairmhan")); Prestation maPresta2 = new Prestation("OuiAdrienCMal", new DateTime(2015, 9, 6, 12, 0, 0), new Intervenant("kantain", "Duvallundi")); Assert.AreEqual(0, maPresta2.CompareTo(maPresta), "Si égale : Le résultat doit être égale à 0 "); }
public void CompareToTest() { Prestation unePrestation = new Prestation("XX", new DateTime(2015, 9, 10, 15, 0, 0), new Intervenant("Dupont", "Jean")); Prestation unePrestation2 = new Prestation("XX", new DateTime(2015, 9, 10, 17, 0, 0), new Intervenant("Dupont", "Jean")); Assert.AreEqual(0, unePrestation.CompareTo(unePrestation2), "Les dates doivent être égales"); }
public void CompareToTestV3() { Prestation unePresta = new Prestation("oulou", new DateTime(2015, 9, 10, 12, 0, 0), new Intervenant("oulou", "oula")); Prestation uneautrePresta = new Prestation("oulou", new DateTime(2015, 9, 9, 12, 0, 0), new Intervenant("oulou", "oula")); Assert.AreEqual(1, unePresta.CompareTo(uneautrePresta), "Erreur : valeur attendue 1."); }
public void CompareToSuperieur() { Prestation unePrestation = new Prestation("XX", new DateTime(2015, 9, 13, 12, 0, 0), new Intervenant("Dupont", "Jean")); Prestation uneAutrePrestation = new Prestation("XX", new DateTime(2015, 9, 12, 12, 0, 0), new Intervenant("Dupont", "Jean")); Assert.AreEqual(1, unePrestation.CompareTo(uneAutrePrestation)); }
public void CompareToTestEstEgale() { 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, 9, 10, 12, 0, 0), new Intervenant("Dupont", "Jean")); Assert.AreEqual(0, unePrestation.CompareTo(uneAutrePrestation)); }
public void CompareToTestV3() { Prestation unePrestation = new Prestation("CC", new DateTime(2015, 9, 11, 12, 0, 0), new Intervenant("Durand", "Annie")); Prestation uneAutrePrestation = new Prestation("CD", new DateTime(2015, 9, 10, 12, 0, 0), new Intervenant("Sainz", "Olivier")); Assert.AreEqual(-1, uneAutrePrestation.CompareTo(unePrestation), "Le chiffre attendu est -1"); }
public void CompareToInfTest() { Prestation unePrestation = new Prestation("Libelle P2", new DateTime(2011, 8, 22), Convert.ToDateTime("17:00:00"), new IntervenantExterne("Sainz", "Olivier", "Radiologue", "Toulon", "0303030303")); Assert.AreEqual(-1, unePrestation.CompareTo(new Prestation("Libelle P1", new DateTime(2015, 9, 8), Convert.ToDateTime("15:00:00"), new IntervenantExterne("Durand", "Annie", "Cardiologue", "Marseille", "0202020202"))), "La date courante est inférieure"); }
public void CompareToTest() { Prestation unePrestation = new Prestation("Libelle P2", new DateTime(2015, 9, 8), Convert.ToDateTime("17:00:00"), new IntervenantExterne("Sainz", "Olivier", "Radiologue", "Toulon", "0303030303")); Assert.AreEqual(0, unePrestation.CompareTo(new Prestation("Libelle P1", new DateTime(2015, 9, 8), Convert.ToDateTime("15:00:00"), new IntervenantExterne("Durand", "Annie", "Cardiologue", "Marseille", "0202020202"))), "Les dates sont identiques"); }