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(); }
public void SendNewGameweekReminder(string url) { var gameweekOpenEmailRecipients = _playerService.GetPlayersEmailsAcceptedAlerts(); Parallel.ForEach(gameweekOpenEmailRecipients, (address) => { _gameEmailService.SendGameweekOpenEmail(address, url); }); }