Example #1
0
        public void DeletePatientExistingPatientTest()
        {
            // Arrange
            PatientRemove patientRemove = new PatientRemove();
            // Act
            var result = patientRemove.DeletePatient(43);

            // Assert
            Assert.IsTrue(result);
        }
Example #2
0
        public void DeletePatientNonExistingPatientTest()
        {
            // Arrange
            PatientRemove patientRemove = new PatientRemove();
            // Act
            var result = patientRemove.DeletePatient(0);

            // Assert
            Assert.IsFalse(result);
        }
Example #3
0
        /// <summary>
        /// This Action calls for the button which can delete a Patient
        /// </summary>
        /// <returns>The form view which contains list of Patients after deleting a paricular Patient</returns>
        public ActionResult RemovePatientUser(int id)
        {
            if (Session["userId"] == null)
            {
                return(Redirect("~"));
            }
            PatientRemove Patient = new PatientRemove();

            Patient.DeletePatient(id);
            return(RedirectToAction("Patients"));
        }