Exemple #1
0
        public void T7_Update_UpdatesSymptomInDB()
        {
            Symptom testSymptom = new Symptom("Anderson", "1234 Main Street");

            testSymptom.Save();
            string newName    = "Nosredna";
            string newAddress = "4321 Side Street";

            testSymptom.Update(newName, newAddress, false);
            string result  = testSymptom.GetName();
            string result2 = testSymptom.GetClassification();

            Assert.Equal(newName, result);
            Assert.Equal(newAddress, result2);
        }
        public override bool Equals(System.Object otherSymptom)
        {
            if (!(otherSymptom is Symptom))
            {
                return(false);
            }
            else
            {
                Symptom newSymptom             = (Symptom)otherSymptom;
                bool    idEquality             = this.GetId() == newSymptom.GetId();
                bool    nameEquality           = this.GetName() == newSymptom.GetName();
                bool    classificationEquality = this.GetClassification() == newSymptom.GetClassification();
                bool    contagiousEquality     = this.IsContagious() == newSymptom.IsContagious();

                return(idEquality && nameEquality && classificationEquality && contagiousEquality);
            }
        }