Using Microsoft Visual Studio 2017's built in test with Moq.
I have a simple class that creates some content, then sends the content to a notification system. I need to test if the notification system was called, but that the call included some text.
public void DoStuff()
var tenantSettings = _tenantService.GetTenantSettings();
tenantSettings.Body = "xxx SOME VALUE xxx";
MyService.SendMail(tenantSettings.Body);
How can I test that SendMail contains the text "SOME VALUE"?
I have a MOCK setup:
MyServiceMock.Setup(x=>x.SendMail(It.IsAny<string>);