Exemplo n.º 1
0
        public void NoPlayers_NoEmailsTriggered()
        {
            A.CallTo(() => _playerService.GetPlayersEmailsAcceptedAlerts()).Returns(new List <string>());
            var svc = CreateService();

            svc.SendNewGameweekReminder("testurl");

            A.CallTo(() => _gameEmailService.SendGameweekOpenEmail(null, null)).WithAnyArguments().MustNotHaveHappened();
        }
Exemplo n.º 2
0
        public void SendNewGameweekReminder(string url)
        {
            var gameweekOpenEmailRecipients = _playerService.GetPlayersEmailsAcceptedAlerts();

            Parallel.ForEach(gameweekOpenEmailRecipients, (address) =>
            {
                _gameEmailService.SendGameweekOpenEmail(address, url);
            });
        }