public async Task UserService_Should_Not_Send_Email_To_Invited_Users()
        {
            var unitOfWork   = new UnitOfWorkBuilder().Build();
            var emailService = A.Fake <IEmailService>();

            var userService = new UserServiceBuilder().WithUnitOfWork(unitOfWork)
                              .WithEmailService(emailService)
                              .Build();

            var user = GetUser();

            user.InvitationSent = true;
            user.Password       = "******";
            await unitOfWork.Users.Add(user);

            await userService.SendEmailToUsers();

            A.CallTo(() => emailService.SendAccountCreationEmail(user, "pwd")).MustNotHaveHappened();
        }
        public async Task Invited_User_Should_Be_Flagged()
        {
            var unitOfWork   = new UnitOfWorkBuilder().Build();
            var emailService = A.Fake <IEmailService>();
            var datetime     = DateTime.UtcNow;

            var userService = new UserServiceBuilder().WithUnitOfWork(unitOfWork)
                              .WithEmailService(emailService)
                              .WithDateTime(datetime)
                              .Build();

            var user = GetUser();
            await unitOfWork.Users.Add(user);

            await userService.SendEmailToUsers();

            var savedUser = await unitOfWork.Users.GetFirst(x => x.Email == user.Email);

            savedUser.InvitationSent.Should().BeTrue();
            savedUser.SendingDate.Should().Be(datetime);
        }