Exemplo n.º 1
0
        public void GivenThereAreNoFeaturesPassedIn_ThenAnEmptyEnumerableShouldBeReturned()
        {
            var loader = new InMemoryFeatureLoadingStrategy();
            var actual = loader.GetFeatures().ToList();

            Assert.IsNotNull(actual);
            Assert.IsFalse(actual.Any());
        }
Exemplo n.º 2
0
        public void GivenFeaturesArePassedToTheConstructor_ThenTheCorrectFeaturesShouldBeReturned()
        {
            var expected = new Feature
            {
                Enabled = true,
                Name    = "test"
            };
            var features = new List <Feature> {
                expected
            };

            var loader = new InMemoryFeatureLoadingStrategy(features);
            var actual = loader.GetFeatures().ToList();

            Assert.IsNotNull(actual);
            Assert.IsTrue(actual.Any());
            Assert.That(actual.First().Name, Is.EqualTo(expected.Name));
            Assert.That(actual.First().Enabled, Is.EqualTo(expected.Enabled));
        }