title: NUnit Unit Test Fails as it expects not null, how can this be mocked with moq to not get this
body: <p>I am getting the following error message in a Web API controller Testing project which is using NUnit.  In the Web Test Unit test, i'm not using Moq, but I would like to use it as currently the real services are getting invoked.   TeamCity is what is reporting this error</p>
  
  <p><strong>Error from TeamCity on the NUnit test</strong></p>
  
  <pre><code>(new) Portal.WebAPI.Tests.dll:        
  Portal.WebAPI.Tests.Controllers.CalendarEventControllerTest.CalendarEventController_SearchCalendarEvent_Success
  
  Test(s) failed.   Expected: not null
  But was:  null
  
  at NUnit.Framework.Assert.That(Object actual, IResolveConstraint expression, String message, Object[] args)
  at NUnit.Framework.Assert.IsNotNull(Object anObject)
  at Portal.WebAPI.Tests.Controllers.CalendarEventControllerTest.   
  
  &lt;CalendarEventController_SearchCalendarEvent_Success&gt;d__1e.MoveNext() in h:\BuildAgent\work\8d99e8b3faa82424\NxtGen\Portal.WebAPI.Tests\Controllers\CalendarEventControllerTest.cs:line 107
  at NUnit.Framework.AsyncInvocationRegion.AsyncTaskInvocationRegion.WaitForPendingOperationsToComplete(Object invocationResult)
  </code></pre>
  
  <p>at NUnit.Core.NUnitAsyncTestMethod.RunTestMethod()</p>
  
  <p><strong>Code</strong></p>
  
  <pre><code>[Test]
  public async Task CalendarEventController_SearchCalendarEvent_Success()
  {
      CalendarEventController controller = new CalendarEventController();
      CalendarEventSearchRequest request = new CalendarEventSearchRequest();
      request.ClientId = 123;
      CalendarEventSearchResponse response = await controller.SearchCalendarEvents(request);
  
      Assert.IsNotNull(response.data);
  }
  </code></pre>
  
  <p>I gather that the issue is <code>Assert.IsNotNull(response.data);</code>   as it is not null, thus teamcity runs and the nunit test fails, right?  </p>
  
  <p>Problem is that I don't know what valid "clientid" even are.   Really shouldn't this just my mocked/faked anyway?  How can I use Moq in this situation?</p>