public void CheckIfPatientIsDeletedWhenDoesNotExist() { PatientDataRepository patientDataRepository = new PatientDataRepository(); var response = patientDataRepository.DischargePatient(8); Assert.AreEqual(false, response); }
public void CheckIfPatientIsDeletedWhenExists() { string cs = @"URI=file:\a\alert-to-care-s22b8\alert-to-care-s22b8\Alert-to-Care\Patient.db"; SQLiteConnection con = new SQLiteConnection(cs, true); con.Open(); using var cmd = new SQLiteCommand(con); cmd.CommandText = @"INSERT INTO Patient(Id, Name, Age, BloodGroup, Address, IcuId, BedNumber) VALUES('200', 'ananya', '90', 'B+', 'Bihar', '2', '2')"; cmd.ExecuteNonQuery(); PatientDataRepository patientDataRepository = new PatientDataRepository(); var response = patientDataRepository.DischargePatient(200); Assert.AreEqual(true, response); }