public async Task QueryDatabasesAsync_WhenQueryingAllDatabases_ThenAllDatabasesGetReturned()
        {
            // Arrange
            await _cosmonautClient.CreateDatabaseAsync(new Database { Id = "Nick" });

            await _cosmonautClient.CreateDatabaseAsync(new Database { Id = "TheGreek" });

            // Act
            var databases = (await _cosmonautClient.QueryDatabasesAsync()).ToList();

            // Assert
            databases.Select(x => x.Id).Should().Contain("Nick");
            databases.Select(x => x.Id).Should().Contain("TheGreek");

            // Cleanup
            await _cosmonautClient.DeleteDatabaseAsync("Nick");

            await _cosmonautClient.DeleteDatabaseAsync("TheGreek");
        }
 public void Dispose()
 {
     _cosmonautClient.DeleteCollectionAsync(_databaseId, _collectionName).GetAwaiter().GetResult();
     _cosmonautClient.DeleteDatabaseAsync(_databaseId).GetAwaiter().GetResult();
 }
Example #3
0
 public void Dispose()
 {
     _cosmonautClient.DeleteDatabaseAsync(_databaseId).GetAwaiter().GetResult();
 }