public async Task CanSaveZeroTasks()
        {
            var options = CreateNewContextOptions();

            const string userId = "1";
            var          user   = new ApplicationUser {
                Id = userId
            };

            using (var context = new AllReadyContext(options))
            {
                context.Users.Add(user);
                await context.SaveChangesAsync();
            }

            var message = new UpdateMyVolunteerTasksCommand {
                UserId = userId, VolunteerTaskSignups = new List <VolunteerTaskSignupViewModel>()
            };

            using (var context = new AllReadyContext(options))
            {
                var sut = new UpdateMyVolunteerTasksCommandHandler(context);
                await sut.Handle(message);
            }

            using (var context = new AllReadyContext(options))
            {
                var volunteerTaskSignups = context.VolunteerTaskSignups.Count();
                Assert.Equal(volunteerTaskSignups, 0);
            }
        }
        public async Task InvokeUpdateTaskSignupAsyncWithTheCorrectParametersForEachTaskSignupViewModelOnCommand()
        {
            var options = CreateNewContextOptions();

            const string userId = "1";
            const int    volunteerTaskSignupId = 1;
            var          user = new ApplicationUser {
                Id = userId
            };
            var dateTimeUtcNow       = DateTime.UtcNow;
            var taskSignupViewModels = new List <VolunteerTaskSignupViewModel>
            {
                new VolunteerTaskSignupViewModel {
                    Id = volunteerTaskSignupId, StatusDescription = "statusDescription1", Status = "Accepted", VolunteerTaskId = 1
                }
            };

            var message = new UpdateMyVolunteerTasksCommand {
                VolunteerTaskSignups = taskSignupViewModels, UserId = userId
            };

            using (var context = new AllReadyContext(options))
            {
                context.Users.Add(user);
                context.VolunteerTaskSignups.Add(new VolunteerTaskSignup {
                    Id = volunteerTaskSignupId
                });
                context.VolunteerTasks.Add(new VolunteerTask {
                    Id = 1
                });
                await context.SaveChangesAsync();
            }

            using (var context = new AllReadyContext(options))
            {
                var sut = new UpdateMyVolunteerTasksCommandHandler(context)
                {
                    DateTimeUtcNow = () => dateTimeUtcNow
                };
                await sut.Handle(message);
            }

            using (var context = new AllReadyContext(options))
            {
                var signup = context.VolunteerTaskSignups.FirstOrDefault(x => x.Id == volunteerTaskSignupId);
                Assert.Equal(signup != null, true);
            }
        }