public void OfType_WithProvider_FeatureIsReturned()
        {
            var feature = new TestFeature();

            var provider = new Mock<IFeatureProvider>();
            provider.Setup(p => p.GetFeature<TestFeature>()).Returns(feature);

            var container = new FeatureContainer(provider.Object);

            var output = container.OfType<TestFeature>();

            (output as ConfigurationDrivenFeatureAdapter).Feature.Should().Equal(feature);
        }
Ejemplo n.º 2
0
        public void OfType_WithProvider_FeatureIsReturned()
        {
            var feature = new TestFeature();

            var provider = new Mock <IFeatureProvider>();

            provider.Setup(p => p.GetFeature <TestFeature>()).Returns(feature);

            var container = new FeatureContainer(provider.Object);

            var output = container.OfType <TestFeature>();

            (output as ConfigurationDrivenFeatureAdapter).Feature.Should().Equal(feature);
        }