public void SendMessageToAssignedVolunteers() { var command = new NotifyVolunteersCommand { ViewModel = new NotifyVolunteersViewModel { Subject = "This is my subject", EmailRecipients = new List<string> { "*****@*****.**", "*****@*****.**" }, EmailMessage = "This is my message" } }; var queueWriter = new Mock<IQueueStorageService>(); var handler = new NotifyVolunteersHandler(queueWriter.Object); var result = handler.Handle(command); queueWriter.Verify(q => q.SendMessageAsync(It.IsAny<string>(), It.IsAny<string>()), Times.Exactly(2)); }
public void SendMessageToAssignedVolunteers() { var command = new NotifyVolunteersCommand { ViewModel = new NotifyVolunteersViewModel { Subject = "This is my subject", EmailRecipients = new List <string> { "*****@*****.**", "*****@*****.**" }, EmailMessage = "This is my message" } }; var queueWriter = new Mock <IQueueStorageService>(); var handler = new NotifyVolunteersHandler(queueWriter.Object); var result = handler.Handle(command); queueWriter.Verify(q => q.SendMessageAsync(It.IsAny <string>(), It.IsAny <string>()), Times.Exactly(2)); }