コード例 #1
0
        public void ShouldEnableABooleanGateForRuby()
        {
            const string stats = "Stats";

            flipper.Enable(stats);

            Assert.That(rubyAdapter.IsEnabled(stats), Is.True);
        }
コード例 #2
0
 public void FeaturesShouldReturnEnabledAndDisabledFeatures()
 {
     var flipper = new Flipper(new MemoryAdapter());
     flipper.Enable("Stats");
     flipper.Enable("Cache");
     flipper.Disable("Search");
     Assert.That(from feature in flipper.Features select feature.Name,
                 Is.EquivalentTo(new[] {"Stats", "Cache", "Search"}));
 }
コード例 #3
0
        public void FeaturesShouldReturnEnabledAndDisabledFeatures()
        {
            var flipper = new Flipper(new MemoryAdapter());

            flipper.Enable("Stats");
            flipper.Enable("Cache");
            flipper.Disable("Search");
            Assert.That(from feature in flipper.Features select feature.Name,
                        Is.EquivalentTo(new[] { "Stats", "Cache", "Search" }));
        }
コード例 #4
0
        public void EnableEnablesTheFeature()
        {
            var flipper = new Flipper(new MemoryAdapter());

            flipper.Enable("Test");
            Assert.That(flipper.Feature("Test").BooleanValue, Is.True);
        }
コード例 #5
0
 public void DisableDisablesTheFeature()
 {
     var flipper = new Flipper(new MemoryAdapter());
     flipper.Enable("Test");
     flipper.Disable("Test");
     Assert.That(flipper.Feature("Test").BooleanValue, Is.False);
 }