title: Unit and Integration Testing for Google Drive API using C# (Client Library v3)?
body: <p>I am writing a small library which uses Google Drive API v3 Client Library for C#.
  And for me it involves a lot of pain because I can't use TDD-style for that purpose.</p>
  
  <p>The regular method for doing the job looks something like:</p>
  
  <pre><code>internal async Task&lt;Google.Apis.Drive.v3.Data.FileList&gt; ReadFileList(string parentId, string pageToken, int pageSize)
  {
      // Define parameters of request.
      var listRequest = this.driveService.Files.List();
      listRequest.PageSize = pageSize;
      listRequest.Q = "mimeType='application/vnd.google-apps.folder' and ('" + parentId + "' in parents)";
      listRequest.Fields = "nextPageToken, files(id, name)";
      listRequest.PageToken = pageToken;
  
      // List files.
      return await listRequest.ExecuteAsync();
  }
  </code></pre>
  
  <p>For Unit Testing it contains a couple of dependencies (probably it might be refactored using factory method pattern):</p>
  
  <ol>
  <li>ListRequest</li>
  <li>FileList</li>
  </ol>
  
  <p>For Integrating Tests there are much more problems:</p>
  
  <ol>
  <li>How should I authenticate such service?</li>
  <li>Even after authentication it will pollute real Authenticated Drive Account.</li>
  <li>How to share the tests between other people?</li>
  <li>Test couldn't pass without an internet connection.</li>
  </ol>
  
  <p>Is there something like "In-Memory" provider for Entity Framework Core?
  What can be done to make Google Drives Unit and Integration Tests manageable?</p>