public void GivenACreateAction_WhenTheModelStateIsValid_ThenItRedirectsToIndex()
{
var model = new VacationPropertyViewModel();
var mockRepository = new Mock<IVacationPropertiesRepository>();
mockRepository.Setup(r => r.CreateAsync(It.IsAny<VacationProperty>())).ReturnsAsync(1);
var controller = new VacationPropertiesController(mockRepository.Object)
{
UserId = () => "bob-id"
};
controller.WithCallTo(c => c.Create(model))
.ShouldRedirectTo(c => c.Index());
mockRepository.Verify(r => r.CreateAsync(It.IsAny<VacationProperty>()), Times.Once);
}