title: How to read data from Cosmos Db emulator in Unit test case
body: <p>I am writing unit test cases and would like to read data from Cosmos Db emulator. I have achieved this far and would need help in reading data now from Emulator. How can I read data from container where lets say I have data with Id = &quot;Test&quot;</p>
  <pre><code>public class DataFixtures
  {
      public DataFixtures()
      {
          app.CreateDefaultLoggerFactory();
      }
  }
  
  
  [CollectionDefinition(&quot;Tabulardata collection&quot;)]
  public class DataCollection : ICollectionFixture&lt;DataFixture&gt;
  {
  }
  
  
  
  [Collection( &quot;Tabulardata collection&quot; )]
  public class DataTests
  {
      private static readonly string CosmosEndpoint = &quot;https://localhost:8081&quot;;
      private static readonly string EmulatorKey = &quot;C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==&quot;;
      private static readonly string DatabaseId = &quot;Recordings&quot;;
      private static readonly string RecordingCollection = &quot;testdata&quot;;
      string Root = Directory.GetParent( Directory.GetCurrentDirectory() ).Parent.Parent.FullName;
  
  
      private void ReadConfig()
      {
          var client = new DocumentClient( new Uri( CosmosEndpoint ), EmulatorKey,
              new ConnectionPolicy
              {
                  ConnectionMode = ConnectionMode.Direct,
                  ConnectionProtocol = Protocol.Tcp
  
              } );
          var databaseCreationResult = client.CreateDatabaseAsync( new Database { Id = DatabaseId } ).Result;
          var collectionCreationResult = client.CreateDocumentCollectionAsync( UriFactory.CreateDatabaseUri( DatabaseId ),
              new DocumentCollection { Id = RecordingCollection } ).Result;            
      
      }
  </code></pre>