Example #1
0
        public void AddComment()
        {
            Patient       patient       = new Patient(1, "username", "email", "password", "name", DateTime.Today, "phonenumber", true, Gender.Female, 23);
            Doctor        doctor        = new Doctor(1, "username", "email", "password", "name", DateTime.Today, "phonenumber", true, Gender.Female);
            TreatmentType treatmentType = new TreatmentType("name", "description");
            Treatment     treatment     = new Treatment(1, "name", DateTime.MinValue, DateTime.Today, patient, doctor, treatmentType);
            Comment       comment       = new Comment("title", "description", DateTime.Today);
            Comment       comment2      = new Comment("title", "description", DateTime.Today);

            treatment.AddComment(comment);
            treatment.AddComment(comment2);

            Assert.True(treatment.Comments.Exists(c => c == comment));
            Assert.Equal(2, treatment.Comments.Count);
        }