public void Delete_WhenShowingView_ThenTheMatchingShoeIsShown()
        {
            // Arrange
            var dbContext = new FakeShoeTrackerDbContext()
                .WithShoe("some shoe", _currentUserId);
            var controller = new ShoeController(dbContext)
                .WithAuthenticatedUser("some user", _currentUserId);

            var shoeId = dbContext.Shoes.Select(s => s.ShoeId).First();

            // Act
            var result = controller.Delete(shoeId);

            // Assert
            var viewResult = (ViewResult)result;
            var shoe = viewResult.CastModel<Shoe>();

            Assert.That(shoe.ShoeId, Is.EqualTo(shoeId));
        }
        public void Delete_WhenShowingViewWithInvalidShoeId_ThenNotFoundResult()
        {
            // Arrange
            var dbContext = new FakeShoeTrackerDbContext();
            var controller = new ShoeController(dbContext)
                .WithAuthenticatedUser("some user", _currentUserId);

            const int shoeId = -1;

            // Act
            var result = controller.Delete(shoeId);

            // Assert
            Assert.That(result, Is.InstanceOf<HttpNotFoundResult>());
        }