示例#1
0
        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);
        }
示例#2
0
        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");
        }
示例#3
0
        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));
 }