public void MedicineStockInfoTest_FailCase_Repository() { medicinestock = null; _repo.Setup(m => m.MedicineStockInformation()).Returns(medicinestock); repo = _repo.Object; List <MedicineStock> result = repo.MedicineStockInformation(); Assert.IsNull(result); }
public IActionResult MedicineStockInformation() { _log4net.Info("Get Api Initiated"); var MedicineData = repo.MedicineStockInformation(); if (MedicineData == null) { return(BadRequest()); } return(Ok(MedicineData)); }
public dynamic MedicineStockInformation1() { try { var Result = repo.MedicineStockInformation(); if (Result == null) { return(null); } _log4net.Info("Medicine Information fetched"); return(Result); } catch (Exception E) { _log4net.Error(" MedicineStockInformation encountered an Exception :" + E.Message); return("MedicineStock Returned null While fetching data"); } }
public void MedicineStockInfoTest_PassCase_Repository() { List <MedicineStock> result = repo.MedicineStockInformation(); Assert.IsNotNull(result); }