Ejemplo n.º 1
0
 public void FullConfiguration_ConfigIsNull_ThrowsAgurmentNullException()
 {
     // Act and Assert
     Should.Throw <ArgumentNullException>(() =>
     {
         DocumentDbProvider.Configure(null);
     });
 }
Ejemplo n.º 2
0
 public void SimpleConfiguration_AuthKeyIsNull_ThrowsArgumentException()
 {
     // Act and Assert
     Should.Throw <ArgumentException>(() =>
     {
         DocumentDbProvider.Configure(TestConfig.ValidEndpoint, null);
     });
 }
        protected void ConfigureProvider(bool autoCreateDbAndCollection = false, bool autoCreateToggle = false)
        {
            var config = TestConfig.ValidConfig(databaseId, collectionId);

            config.AutoCreateDatabaseAndCollection = autoCreateDbAndCollection;
            config.AutoCreateFeature = autoCreateToggle;

            DocumentDbProvider.Configure(config);
        }
Ejemplo n.º 4
0
        public void SimpleConfiguration_ValidEndpointAndAuthKeyToggleDoesNotExist_ThrowsToggleConfigurationError()
        {
            // Arrange
            DocumentDbProvider.Configure(TestConfig.ValidEndpoint, TestConfig.ValidAuthKey);

            // Act and Assert
            Should.Throw <ToggleConfigurationError>(() =>
            {
                var toggleValue = sut.EvaluateBooleanToggleValue(new TestFeatureToggle());
            });
        }
Ejemplo n.º 5
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            //TableStorageProvider.Configure("UseDevelopmentStorage=true");
            TableStorageProvider.Configure(new TableStorageConfiguration
            {
                ConnectionString  = "UseDevelopmentStorage=true",
                AutoCreateFeature = true,
                AutoCreateTable   = true
            });

            //DocumentDbProvider.Configure("https://localhost:8081", "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==");
            DocumentDbProvider.Configure(new DocumentDbConfiguration
            {
                ServiceEndpoint = "https://localhost:8081",
                AuthKey         = "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==",
                AutoCreateDatabaseAndCollection = true,
                AutoCreateFeature = true
            });
        }