public ChangeVolunteerTaskStatusCommandHandlerShould()
 {
     mediator       = new Mock <IMediator>();
     commandHandler = new ChangeVolunteerTaskStatusCommandHandler(Context, mediator.Object)
     {
         DateTimeUtcNow = () => dateTimeUtcNow
     };
 }
        public async Task VolunteerAcceptsTask()
        {
            var mediator = new Mock <IMediator>();

            var volunteerTask = Context.VolunteerTasks.First();
            var user          = Context.Users.First();
            var command       = new ChangeVolunteerTaskStatusCommand
            {
                VolunteerTaskId     = volunteerTask.Id,
                UserId              = user.Id,
                VolunteerTaskStatus = VolunteerTaskStatus.Accepted
            };
            var handler = new ChangeVolunteerTaskStatusCommandHandler(Context, mediator.Object);
            await handler.Handle(command);

            var volunteerTaskSignup = Context.VolunteerTaskSignups.First();

            mediator.Verify(b => b.PublishAsync(It.Is <VolunteerTaskSignupStatusChanged>(notifyCommand => notifyCommand.SignupId == volunteerTaskSignup.Id)), Times.Once());
        }