Ejemplo n.º 1
0
        static IntegrationTestsRuntime()
        {
            Environment = TestEnvironments.GetMachineSpecificOrDefaultTestEnvironment();

            if(Environment.IsAgainstCloudant() && !Environment.HasSupportFor(TestScenarios.Cloudant))
                throw new NotSupportedException("The test environment's ServerClient and/or DbClient is configured to run against Cloudant, but the environment has no support for Cloudant.");
        }
Ejemplo n.º 2
0
        static IntegrationTestsRuntime()
        {
            using (var c = new HttpClient())
            {
                NormalEnvironment = GetTestEnvironment(c, "normal");
                CloudantEnvironment = GetTestEnvironment(c, "cloudant");
            }

            if (NormalEnvironment != null)
            {
                using (var client = CreateNormalClient())
                {
                    //client.Database.PutAsync().Wait();
                    client.ClearAllDocuments();
                }
            }

            if (CloudantEnvironment != null)
            {
                using (var client = CreateCloudantClient())
                {
                    //client.Database.PutAsync().Wait();
                    client.ClearAllDocuments();
                }
            }
        }