예제 #1
0
        public async Task IsFeatureEnabled_HasNoStrategies_ReturnsFalse()
        {
            var featureId = Guid.NewGuid().ToString();

            InMemoryFeatureStore.Features.TryAdd(featureId, new Feature
            {
                Id      = featureId,
                Enabled = true,
                ActivationStrategies = new Dictionary <string, Dictionary <string, string> > {
                    ["default"] = new Dictionary <string, string>()
                }
            });
            Assert.True(_sut.IsFeatureEnabled(featureId));
            Assert.True(await _sut.IsFeatureEnabledAsync(featureId, CancellationToken.None));
        }