[InlineData("Fragrant Garlic", "Fragrant Garlic (Small)", "Spice", 1.50, 100.0, "g", -1)] // stock
        public async Task Update_plant_details_bad_request_response(string name, string description, string category, decimal price, decimal weight, string unit, int stock)
        {
            //Arrange
            var plantDetailsContext = new PlantListingContext(_dbOptions);

            var userId = "wpkeoh";
            var invalidUpdatePlantDetailsViewModel = new CreateEditPlantDetailsViewModel()
            {
                PlantDetailsId = 5,
                Name           = name,
                Description    = description,
                Category       = category,
                Price          = price,
                Weight         = weight,
                Unit           = unit,
                Stock          = stock,
                UserId         = userId
            };

            //Act
            var plantDetailsController = new PlantListingController(plantDetailsContext, _mockPlantImageService.Object);
            var actionResult           = await plantDetailsController.UpdatePlantDetails(invalidUpdatePlantDetailsViewModel);

            //Assert
            Assert.IsType <BadRequestResult>(actionResult);
        }
        public async Task Update_plant_details_success()
        {
            //Arrange
            var plantDetailsContext = new PlantListingContext(_dbOptions);

            var userId = "wpkeoh";
            var updatePlantDetailsViewModel = new CreateEditPlantDetailsViewModel()
            {
                PlantDetailsId = 5,
                Name           = "Fragrant Garlic",
                Description    = "Fragrant Garlic (Small)",
                Category       = "Spice",
                Price          = 1.50m,
                Weight         = 100.0m,
                Unit           = "g",
                Stock          = 100,
                UserId         = userId
            };

            //Act
            var plantDetailsController = new PlantListingController(plantDetailsContext, _mockPlantImageService.Object);
            var actionResult           = await plantDetailsController.UpdatePlantDetails(updatePlantDetailsViewModel);

            //Assert
            Assert.IsType <NoContentResult>(actionResult);
        }
        public async Task Update_plant_details_not_found_reponse()
        {
            //Arrange
            var plantDetailsContext = new PlantListingContext(_dbOptions);

            var userId = "cktan";
            var NotFoundUpdatePlantDetailsViewModel = new CreateEditPlantDetailsViewModel()
            {
                PlantDetailsId = 99,
                Name           = "Bean sprouts",
                Description    = "Organic bean sprouts",
                Category       = "Vegetable",
                Price          = 0.80m,
                Weight         = 200.0m,
                Unit           = "g",
                Stock          = 100,
                UserId         = userId
            };

            //Act
            var plantDetailsController = new PlantListingController(plantDetailsContext, _mockPlantImageService.Object);
            var actionResult           = await plantDetailsController.UpdatePlantDetails(NotFoundUpdatePlantDetailsViewModel);

            //Assert
            Assert.IsType <NotFoundObjectResult>(actionResult);
        }