예제 #1
0
        public void GetAllFeatures_GivenFeatureEnabledConfig_ReturnsEnabledFeature()
        {
            var feature = FeatureToggles.GetAllFeatures().FirstOrDefault(x => x.Name == "featureenabled");

            Assert.IsNotNull(feature);
            Assert.AreEqual("featureenabled", feature.Name);
            Assert.AreEqual(true, feature.Enabled);
        }
예제 #2
0
        public void GetAllFeatures_ReturnsFeaturesDescriptionAndStepsAlongWithTheFeatures()
        {
            //Arrange
            var feature = FeatureToggles.GetAllFeatures().First();

            //Assert
            Assert.IsNotNull(feature);
            Assert.AreEqual("Short description", feature.ShortDescription);
            Assert.AreEqual("<li>Step1</li>", feature.Requirements);
        }
예제 #3
0
        public void GetAllFeatures_GivenFeaturesInConfig_ReturnsElevenFeatureToggles()
        {
            var features = FeatureToggles.GetAllFeatures();

            Assert.AreEqual(13, features.Count());
        }
예제 #4
0
        public void GetAllFeatures_GivenFeaturesInConfig_ReturnsSixFeatureToggles()
        {
            var features = FeatureToggles.GetAllFeatures();

            Assert.AreEqual(6, features.Count);
        }