public void DeleteFeed_WithUnusedFeedId_ReturnsNotFound(int unusedFeedId)
        {
            string inMemoryDatabaseName = $"DeleteFeed_WithUnusedFeedId_ReturnsNotFound{unusedFeedId}";

            using (var myInMemoryTechResourcesContext = InMemoryTechResourcesContext(inMemoryDatabaseName))
            {
                FeedsController feedsController            = GetNewFeedsController(myInMemoryTechResourcesContext);
                IActionResult   actionResultFromController = feedsController.DeleteFeed(unusedFeedId).Result;
                Assert.IsType <NotFoundResult>(actionResultFromController);
            }
        }
        public void DeleteFeed_WithValidFeedId_ReturnsOkResponse(int feedIdOfFeedToDelete)
        {
            string inMemoryDatabaseName = $"DeleteFeed_WithValidFeedId_ReturnsOkResponse{feedIdOfFeedToDelete}";

            InsertMockFeedDataIntoInMemoryDatabase(inMemoryDatabaseName);
            using (var myInMemoryTechResourcesContext = InMemoryTechResourcesContext(inMemoryDatabaseName))
            {
                FeedsController feedsController            = GetNewFeedsController(myInMemoryTechResourcesContext);
                IActionResult   actionResultFromController = feedsController.DeleteFeed(feedIdOfFeedToDelete).Result;
                Assert.IsType <OkObjectResult>(actionResultFromController);
            }
        }
        public void DeleteFeed_WithValidFeedId_ReturnsDeletedFeed(int feedIdOfFeedToDelete)
        {
            string inMemoryDatabaseName = $"DeleteFeed_WithValidFeedId_ReturnsDeletedFeed{feedIdOfFeedToDelete}";

            InsertMockFeedDataIntoInMemoryDatabase(inMemoryDatabaseName);
            using (var myInMemoryTechResourcesContext = InMemoryTechResourcesContext(inMemoryDatabaseName))
            {
                Feed            feedToBeDeleted                    = myInMemoryTechResourcesContext.Feed.Find(feedIdOfFeedToDelete);
                FeedsController feedsController                    = GetNewFeedsController(myInMemoryTechResourcesContext);
                OkObjectResult  actionResultFromController         = (OkObjectResult)feedsController.DeleteFeed(feedIdOfFeedToDelete).Result;
                string          expectedSerializedFeedToBeDeleted  = JsonConvert.SerializeObject(feedToBeDeleted);
                string          serializedDeletedFeedBeingReturned = JsonConvert.SerializeObject(actionResultFromController.Value);
                Assert.Equal(expectedSerializedFeedToBeDeleted, serializedDeletedFeedBeingReturned);
            }
        }
        public void DeleteFeed_WithValidFeedId_DeletesFeedFromDatabase(int feedIdOfFeedToDelete)
        {
            string inMemoryDatabaseName = $"DeleteFeed_WithValidFeedId_DeletesFeedFromDatabase{feedIdOfFeedToDelete}";

            InsertMockFeedDataIntoInMemoryDatabase(inMemoryDatabaseName);
            using (var myInMemoryTechResourcesContext = InMemoryTechResourcesContext(inMemoryDatabaseName))
            {
                FeedsController feedsController            = GetNewFeedsController(myInMemoryTechResourcesContext);
                IActionResult   actionResultFromController = feedsController.DeleteFeed(feedIdOfFeedToDelete).Result;
            }
            using (var myInMemoryTechResourcesContext = InMemoryTechResourcesContext(inMemoryDatabaseName))
            {
                Feed attemptToFindDeletedFeed = myInMemoryTechResourcesContext.Feed.Where(x => x.Id == feedIdOfFeedToDelete).FirstOrDefault();
                Assert.Null(attemptToFindDeletedFeed);
            }
        }