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); }
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); }