public void FullConfiguration_ConfigIsNull_ThrowsAgurmentNullException() { // Act and Assert Should.Throw <ArgumentNullException>(() => { DocumentDbProvider.Configure(null); }); }
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); }
public void SimpleConfiguration_ValidEndpointAndAuthKeyToggleDoesNotExist_ThrowsToggleConfigurationError() { // Arrange DocumentDbProvider.Configure(TestConfig.ValidEndpoint, TestConfig.ValidAuthKey); // Act and Assert Should.Throw <ToggleConfigurationError>(() => { var toggleValue = sut.EvaluateBooleanToggleValue(new TestFeatureToggle()); }); }
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 }); }