コード例 #1
0
        private static void SetupOverrides(Dictionary <string, bool> dictionary)
        {
            var overrides = new Mock <IOverrideProvider>();

            overrides.Setup(x => x.GetOverrides()).Returns(dictionary);
            FeatureToggles.SetOverrideProvider(overrides.Object);
        }
コード例 #2
0
        public void GetOverrideProvider_ReturnsCurrentProvider()
        {
            var provider = Substitute.For <IOverrideProvider>();

            FeatureToggles.SetOverrideProvider(provider);

            var overrides = FeatureToggles.GetOverrideProviders();

            overrides.Should().Contain(provider);
        }
コード例 #3
0
 public void TearDown()
 {
     FeatureToggles.SetOverrideProvider(new CookieOverrideProvider());
 }