public void ShouldReturnDeactivatedFail() { //HPCareDBContext dbContext = MockDataContext.GetMockHPCareDBContext(); impDiagnosis diagnosis = new impDiagnosis(dbContext); Disease disease = dbContext.Diseases.FirstOrDefault(); string results = diagnosis.DeactivateDisease(disease.Disease_id); string expected = "null"; //assert test = extentReport.StartTest("Save Diagnosis-failTest", "expect null"); Assert.AreEqual(expected, results); }
public void ShouldReturnInvalidData() { //arrange impDiagnosis diagnosis = new impDiagnosis(dbContext); //act Disease disease = null; string results = diagnosis.DeactivateDisease(disease.Disease_id); string expected = "Invalid data"; //assert test = extentReport.StartTest("Save Diagnosis null instance", "Test empty instance "); Assert.AreEqual(expected, results); Console.WriteLine("test invalid data"); }
public void ShouldReturnDeactivated() { //HPCareDBContext dbContext = MockDataContext.GetMockHPCareDBContext(); impDiagnosis diagnosis = new impDiagnosis(dbContext); Disease disease = dbContext.Diseases.FirstOrDefault(); string results = diagnosis.DeactivateDisease(disease.Disease_id); string expected = "Disease Deactivated"; //assert test = extentReport.StartTest("Deactivate Diagnosis ", "Assert true diagnosis size reduced by one "); Assert.AreEqual(expected, results); Console.WriteLine("should return deactivated"); }
public string DeactivateDisease(int disease_id) { return(impDiagnosis.DeactivateDisease(disease_id)); }