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

            var shoeOnView = controller.Create().CastModel<Shoe>();

            // Act
            controller.Create(shoeOnView);

            // Assert
            Assert.That(dbContext.Shoes.Count(), Is.EqualTo(0));
        }
        public void Create_WhenShowingView_ThenNewShoeHasDefaults()
        {
            // Arrange
            var dbContext = new FakeShoeTrackerDbContext();
            var controller = new ShoeController(dbContext)
                .WithAuthenticatedUser("some user",_currentUserId);

            // Act
            var result = controller.Create();

            // Assert
            var modelData = result.CastModel<Shoe>();

            Assert.That(modelData.UserId,Is.EqualTo(_currentUserId));
            Assert.That(modelData.FirstUsed,Is.EqualTo(DateTime.Today));
        }