public void GetStockInformation_ValidInput_ReturnsSuccessResponse() { _service.Setup(x => x.GetStockDetails()).Returns(medicineStock); var controller = new MedicineStockInformationController(_service.Object); var data = controller.GetMedicineStock(); var res = data as OkObjectResult; Assert.AreEqual(200, res.StatusCode); }
public void GetMedicineStockinfo_ValidInput_OkResult() { _pro.Setup(x => x.GetMedicineStock()).Returns(medicineStock); var controller = new MedicineStockInformationController(_pro.Object); var data = controller.Get(); var res = data as OkObjectResult; Assert.AreEqual(200, res.StatusCode); }
public void GetStockInformation_InValidInput_ReturnsNull() { medicineStock = null; _service.Setup(x => x.GetStockDetails()).Returns(medicineStock); var controller = new MedicineStockInformationController(_service.Object); var data = controller.GetMedicineStock(); var res = data as OkObjectResult; Assert.IsNull(res); }