Ejemplo n.º 1
0
        public void GetPharmacySupply_ValidData_NoContent()
        {
            providerRepo.Setup(m => m.GetSupply(emptyDemand)).Returns(Task.FromResult(supplyList));
            var pro = new PharmacySupplyController(providerRepo.Object);
            var res = pro.GetPharmacySupply(emptyDemand).Result as ObjectResult;

            Assert.AreEqual(res.StatusCode, 404);
        }
Ejemplo n.º 2
0
        public void PharmacySupply_InValidData_ReturnsBadRequest()
        {
            providerRepo.Setup(m => m.GetSupply(wrongDemand)).Returns(Task.FromResult(new List <PharmacyMedicineSupply>()));
            var pro = new PharmacySupplyController(providerRepo.Object);
            var res = pro.GetPharmacySupply(wrongDemand).Result as ObjectResult;

            Assert.AreEqual(res.StatusCode, 404);
        }