title: Using Moq to see if method was called with a value
body: <p>Using Microsoft Visual Studio 2017's built in test with Moq.</p>
  
  <p>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.</p>
  
  <pre><code> public void DoStuff()
              var tenantSettings = _tenantService.GetTenantSettings();
              tenantSettings.Body = "xxx SOME VALUE xxx";
              MyService.SendMail(tenantSettings.Body);
  </code></pre>
  
  <p>How can I test that SendMail contains the text "SOME VALUE"?</p>
  
  <p>I have a MOCK setup:</p>
  
  <pre><code> MyServiceMock.Setup(x=&gt;x.SendMail(It.IsAny&lt;string&gt;);
  </code></pre>