Beispiel #1
0
        public void Locate_Returns_Null_For_Toggles_Not_Found()
        {
            var featureConfiguration = new FeatureConfiguration();

            var locator = new LocateByNameStrategy(featureConfiguration, "idontexist");

            Assert.IsNull(locator.Locate());
        }
Beispiel #2
0
        public void Can_Find_Feature_Toggle_By_Name()
        {
            const string toggleName = "testName";

            var toggle = new BooleanToggle(toggleName, true);

            var featureConfiguration = new FeatureConfiguration {
                toggle
            };

            var locator = new LocateByNameStrategy(featureConfiguration, toggleName);

            Assert.AreSame(toggle, locator.Locate());
        }