Skip to content

Instantly share code, notes, and snippets.

@obegendi
Created July 21, 2019 16:15
Show Gist options
  • Save obegendi/992f49e0755f3783a645b68b15c04cef to your computer and use it in GitHub Desktop.
Save obegendi/992f49e0755f3783a645b68b15c04cef to your computer and use it in GitHub Desktop.
[Fact]
public void KeywordReportShouldTriggerEmail()
{
//Arrange
var emailMock = new Mock<IEmailServices>();
emailMock.Setup(x => x.Send(It.IsAny<object>)).Returns(true);
AdwordsServices service = new AdwordsServices(_emailServices);
var date = DateTime.Today.AddDays(-3).ToString("yyyyMMdd");
//Act
var list = service.KeywordReport(date);
//Assert
emailMock.Verify(x => x.PublishToQueue(),Times.Once());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment