Beispiel #1
0
        public void CompareToTest2()
        {
            Prestation unePrestation      = new Prestation("XIX", new DateTime(2017, 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.IsTrue(unePrestation.CompareTo(uneAutrePrestation) > 0);
        }
Beispiel #2
0
        public void CompareToTest()
        {
            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), "La somme doit être égal à 0");
        }
Beispiel #3
0
 /// <summary>
 /// Compare les dates
 /// </summary>
 /// <param name="unePrestation">Objet de type Prestation</param>
 /// <returns>Retourne un entier compris entre -1 et 1.</returns>
 public int CompareTo(Prestation unePrestation)
 {
     if (this.dateSoin.Equals(unePrestation.GetDateSoin()))
     {
         return(0);
     }
     else if (this.dateSoin > unePrestation.GetDateSoin())
     {
         return(1);
     }
     else
     {
         return(-1);
     }
 }
Beispiel #4
0
 /// <summary>
 /// Initialise une nouvelle instance de la classe Dossier.
 /// </summary>
 /// <param name="unNomPatient">Chaîne de caractères unNomPatient</param>
 /// <param name="unPrenomPatient">Chaîne de caractères unPrenomPatient</param>
 /// <param name="uneDate">Objet de type DateTimee</param>
 /// <param name="unePrestation">Objet de type Prestation</param>
 public Dossier(string unNomPatient, string unPrenomPatient, DateTime uneDate, Prestation unePrestation)
 {
     this.nomPatient           = unNomPatient;
     this.prenomPatient        = unPrenomPatient;
     this.dateNaissancePatient = uneDate;
     this.mesPrestations       = new List <Prestation>();
     this.mesPrestations.Add(unePrestation);
 }
Beispiel #5
0
 /// <summary>
 /// Ajoute une prestation à la liste de prestation
 /// </summary>
 /// <param name="unePrestation"> Objet de la classe Prestation</param>
 public void AjouterPrestation(Prestation unePrestation)
 {
     this.lesPrestations.Add(unePrestation);
 }