public void FullConfiguration_ConfigIsNull_ThrowsAgurmentNullException() { // Act and Assert Should.Throw <ArgumentNullException>(() => { TableStorageProvider.Configure((TableStorageConfiguration)null); }); }
public void SimpleConfiguration_ConnectionStringIsNull_ThrowsArgumentException() { // Act and Assert Should.Throw <ArgumentException>(() => { TableStorageProvider.Configure((string)null); }); }
public void SimpleConfiguration_ValidConnectionStringToggleDoesNotExist_ThrowsToggleConfigurationError() { // Arrange TableStorageProvider.Configure(TestConfig.ValidConnectionString); // Act and Assert Should.Throw <ToggleConfigurationError>(() => { var toggleValue = sut.EvaluateBooleanToggleValue(new TestFeatureToggle()); }); }
protected void ConfigureProvider(bool autoCreateTable = false, bool autoCreateToggle = false) { var config = new TableStorageConfiguration { ConnectionString = "UseDevelopmentStorage=true" }; config.AutoCreateTable = autoCreateTable; config.AutoCreateFeature = autoCreateToggle; config.TableName = tableName; TableStorageProvider.Configure(config); }
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 }); }