public void GetFeatures_WithoutTheFeatureBeingRegistered_ThrowsKeyNotFoundException()
        {
            var provider = new InMemoryFeatureProvider(new IFeature[] { });
            Action action = () => provider.GetFeature<TestFeature>();

            action.ShouldThrow<KeyNotFoundException>();
        }
        public void GetFeatures_WithoutTheFeatureBeingRegistered_ThrowsKeyNotFoundException()
        {
            var    provider = new InMemoryFeatureProvider(new IFeature[] { });
            Action action   = () => provider.GetFeature <TestFeature>();

            action.ShouldThrow <KeyNotFoundException>();
        }
        public void GetFeatures_WhenTheFeatureBeingRegistered_TheFeatureIsReturned()
        {
            var featureToLookFor = new TestFeature2();
            var provider = new InMemoryFeatureProvider(new[] { new TestFeature(), featureToLookFor, new TestFeature3() });

            var feature = provider.GetFeature<TestFeature2>();

            feature.Should().Be.SameAs(featureToLookFor);
        }
        public void GetFeatures_WhenTheFeatureBeingRegistered_TheFeatureIsReturned()
        {
            var featureToLookFor = new TestFeature2();
            var provider         = new InMemoryFeatureProvider(new[] { new TestFeature(), featureToLookFor, new TestFeature3() });

            var feature = provider.GetFeature <TestFeature2>();

            feature.Should().Be.SameAs(featureToLookFor);
        }