public void Should_use_case_insensitive_keys_for_property_quotas()
        {
            var options1 = new PropertyQuotaOptions();
            var options2 = new PropertyQuotaOptions();
            var options3 = new PropertyQuotaOptions();

            builder.SetPropertyQuota("prop1", options1);
            builder.SetPropertyQuota("prop2", options2);
            builder.SetPropertyQuota("PROP2", options3);

            var config = builder.Build();

            config.PropertyQuotas.Should().HaveCount(2);
            config.PropertyQuotas["prop1"]().Should().BeSameAs(options1);
            config.PropertyQuotas["prop2"]().Should().BeSameAs(options3);
        }
Esempio n. 2
0
 public IVostokThrottlingBuilder UsePropertyQuota(string propertyName, Func <PropertyQuotaOptions> quotaOptionsProvider)
 {
     configurationBuilder.SetPropertyQuota(propertyName, quotaOptionsProvider);
     return(this);
 }