Example #1
0
        public void MedicineStockInfoTest()
        {
            List <MedicineStock> answer = ser.MedicineStockInformation1();

            Assert.AreEqual(medicinestock, answer);
            Assert.Pass();
        }
Example #2
0
        public void MedicineStockInfoTest_FailCase_Service()
        {
            medicinestock = null;
            _ser.Setup(x => x.MedicineStockInformation1()).Returns(medicinestock);
            ser = _ser.Object;
            List <MedicineStock> result = ser.MedicineStockInformation1();

            Assert.IsNull(result);
        }
 public IActionResult MedicineStockInformation()
 {
     _log4net.Info("Get Api Initiated");
     try
     {
         var MedicineData = service.MedicineStockInformation1();
         if (MedicineData == null)
         {
             _log4net.Info("Medicine Data Null");
             return(BadRequest());
         }
         _log4net.Info("Medicine Data Returned");
         return(Ok(MedicineData));
     }
     catch (Exception E)
     {
         _log4net.Error(" Http MedicineStockInformation encountered an Exception :" + E.Message);
         return(BadRequest());
     }
 }