Пример #1
0
        public void HasRazorCoreConfigurationCapability_DotNetCoreRazorConfigCapability_ReturnsTrue()
        {
            // Arrange
            var projectCapabilities = new[] { CoreProjectConfigurationProvider.DotNetCoreRazorConfigurationCapability };
            var projectInstance     = new ProjectInstance(ProjectRootElement.Create());
            var context             = new ProjectConfigurationProviderContext(projectCapabilities, projectInstance);
            var provider            = new TestCoreProjectConfigurationProvider();

            // Act
            var result = provider.HasRazorCoreConfigurationCapability(context);

            // Assert
            Assert.True(result);
        }
Пример #2
0
        public void HasRazorCoreCapability_NoCapabilities_ReturnsFalse()
        {
            // Arrange
            var projectCapabilities = Array.Empty <string>();
            var projectInstance     = new ProjectInstance(ProjectRootElement.Create());
            var context             = new ProjectConfigurationProviderContext(projectCapabilities, projectInstance);
            var provider            = new TestCoreProjectConfigurationProvider();

            // Act
            var result = provider.HasRazorCoreCapability(context);

            // Assert
            Assert.False(result);
        }