public void Delete_ShouldReturnNotFound_WhenDeletingNonExistingRecipe()
        {
            var recipe = TestDataRepository.BuildRecipe();
            var result = _recipesController.Delete(recipe.ID.ToString());

            var res = result as NotFoundResult;

            Assert.IsNotNull(res);
        }
        public void Update_ShouldReturnNotFound_WhenUpdatedNonExistingRecipe()
        {
            var recipe = TestDataRepository.BuildRecipe();
            var result = _recipesController.Update(recipe);

            var res = result as NotFoundResult;

            Assert.IsNotNull(res);
        }
        public void GetByID_ShouldReturnOk_AndValidResult_IfObjectIsFound()
        {
            var recipe = TestDataRepository.BuildRecipe();

            _repository.Setup(x => x.FindById(recipe.ID.ToString())).Returns(recipe);
            var result = _recipesController.Get(recipe.ID.ToString());

            Assert.IsNotNull(result);
            Assert.AreEqual(recipe, result.Value);
        }
        public void Delete_ShouldReturnNoContent_WhenDeletingExistingRecipe()
        {
            var recipe = TestDataRepository.BuildRecipe();

            _repository.Setup(x => x.FindById(recipe.ID.ToString())).Returns(recipe);
            var result = _recipesController.Delete(recipe.ID.ToString());

            var res = result as NoContentResult;

            Assert.IsNotNull(res);
        }