예제 #1
0
        public void Create_DoesNotSupportViewComponentTagHelpers_ForVersion1_0()
        {
            // Arrange
            var projectManager = new TestProjectSnapshotManager(Workspace);

            projectManager.HostProjectAdded(HostProject_For_1_0);
            projectManager.WorkspaceProjectAdded(WorkspaceProject);

            var factoryService = new DefaultProjectEngineFactoryService(projectManager, FallbackFactory, CustomFactories);

            // Act
            var engine = factoryService.Create("/TestPath/SomePath/", b =>
            {
                b.Features.Add(new MyCoolNewFeature());
            });

            // Assert
            Assert.Single(engine.Engine.Features.OfType <MyCoolNewFeature>());
            Assert.Empty(engine.Engine.Features.OfType <MvcLatest.ViewComponentTagHelperDescriptorProvider>());
            Assert.Empty(engine.Engine.Features.OfType <MvcLatest.MvcViewDocumentClassifierPass>());
            Assert.Empty(engine.Engine.Features.OfType <MvcLatest.ViewComponentTagHelperPass>());
        }