Пример #1
0
 protected override async Task ActionAsync(CancellationToken cts)
 {
     if (_ffService.IsEnabled <ConsoleLogFeature>())
     {
         OzzyLogger <ICommonEvents> .Log.TraceInformationalEvent("process 2");
     }
 }
Пример #2
0
        public void EmptyConfiguration_Should_ReturnFalse()
        {
            var testFlagName      = "dummyFlag";
            var configSectionName = "featureFlags";
            var config            = new Dictionary <string, string>()
            {
            };

            IFeatureFlagService featureFlagService = GetConfigBasedFlagService(config, configSectionName);

            Assert.False(featureFlagService.IsEnabled(testFlagName));
        }
Пример #3
0
        public void ExistingFlag_Should_ReturnTrue()
        {
            var testFlagName      = "dummyFlag";
            var configSectionName = "featureFlags";
            var config            = new Dictionary <string, string>()
            {
                [$"{configSectionName}:{testFlagName}:Enabled"] = "true",
            };

            IFeatureFlagService featureFlagService = GetConfigBasedFlagService(config, configSectionName);

            Assert.True(featureFlagService.IsEnabled(testFlagName));
        }