public void Startup()
        {
            //var client = TestCommon.CreateClient(false, Protocol.Tcp);
            var client = TestCommon.CreateClient(true);

            TestCommon.DeleteAllDatabasesAsync(client).Wait();
        }
Example #2
0
        public void TestInitialize()
        {
            DocumentClient client = TestCommon.CreateClient(true);

            TestCommon.DeleteAllDatabasesAsync(client).Wait();

            this.writeRegionEndpointUri = new Uri(ConfigurationManager.AppSettings["GatewayEndpoint"]);
            this.masterKey = ConfigurationManager.AppSettings["MasterKey"];
        }
        private async Task <DocumentCollection> SetupSingleCollectionScenario()
        {
            DocumentClient client = TestCommon.CreateClient(true);
            await TestCommon.DeleteAllDatabasesAsync();

            Database database             = (await client.CreateDatabaseAsync(new Database {
                Id = this.DatabaseName
            })).Resource;
            DocumentCollection collection = (await client.CreateDocumentCollectionIfNotExistsAsync(database.SelfLink, new DocumentCollection {
                Id = this.CollectionName
            }, new RequestOptions {
                OfferThroughput = 10000
            })).Resource;

            //   await Task.Delay(30000);

            return(collection);
        }
Example #4
0
        private async Task <CosmosContainerSettings> SetupSingleCollectionScenario()
        {
            DocumentClient client = TestCommon.CreateClient(true);

            TestCommon.DeleteAllDatabasesAsync(client).Wait();

            CosmosDatabaseSettings database    = (await client.CreateDatabaseAsync(new CosmosDatabaseSettings {
                Id = this.DatabaseName
            })).Resource;
            CosmosContainerSettings collection = (await client.CreateDocumentCollectionIfNotExistsAsync(database.SelfLink, new CosmosContainerSettings {
                Id = this.CollectionName
            }, new RequestOptions {
                OfferThroughput = 10000
            })).Resource;

            //   await Task.Delay(30000);

            return(collection);
        }
 public async Task TestCleanup()
 {
     await TestCommon.DeleteAllDatabasesAsync();
 }
 public async Task TestInitialize()
 {
     // Put test init code here
     await TestCommon.DeleteAllDatabasesAsync();
 }
Example #7
0
 public async Task Startup()
 {
     //var client = TestCommon.CreateClient(false, Protocol.Tcp);
     var client = TestCommon.CreateClient(true);
     await TestCommon.DeleteAllDatabasesAsync();
 }
 public void TestCleanup()
 {
     TestCommon.DeleteAllDatabasesAsync(documentClient).Wait();
 }