Beispiel #1
0
        public async Task GetDefaultValuesForDimensionsAsync_NoPropertyValue()
        {
            var project             = ProjectRootElementFactory.Create();
            var projectXmlAccessor  = IProjectXmlAccessorFactory.Create(project);
            var provider            = new ConfigurationProjectConfigurationDimensionProvider(projectXmlAccessor);
            var unconfiguredProject = UnconfiguredProjectFactory.Create();
            var values = await provider.GetDefaultValuesForDimensionsAsync(unconfiguredProject);

            Assert.Empty(values);
        }
        public async void ConfigurationProjectConfigurationDimensionProvider_GetDefaultValuesForDimensionsAsync_NoPropertyValue()
        {
            using (var projectFile = new MsBuildProjectFile())
            {
                IProjectXmlAccessor _projectXmlAccessor = IProjectXmlAccessorFactory.Create(projectFile.Project);
                var provider            = new ConfigurationProjectConfigurationDimensionProvider(_projectXmlAccessor);
                var unconfiguredProject = UnconfiguredProjectFactory.Create(filePath: projectFile.Filename);
                var values = await provider.GetDefaultValuesForDimensionsAsync(unconfiguredProject);

                Assert.Equal(0, values.Count());
            }
        }
Beispiel #3
0
        public async Task GetDefaultValuesForDimensionsAsync()
        {
            var project             = ProjectRootElementFactory.Create(projectXml);
            var projectXmlAccessor  = IProjectXmlAccessorFactory.Create(project);
            var provider            = new ConfigurationProjectConfigurationDimensionProvider(projectXmlAccessor);
            var unconfiguredProject = UnconfiguredProjectFactory.Create();
            var values = await provider.GetDefaultValuesForDimensionsAsync(unconfiguredProject);

            Assert.Single(values);
            var value = values.First();

            Assert.Equal(ConfigurationGeneral.ConfigurationProperty, value.Key);
            Assert.Equal("Debug", value.Value);
        }
Beispiel #4
0
        public async Task GetDefaultValuesForDimensionsAsync()
        {
            using (var projectFile = new MsBuildProjectFile(projectXml))
            {
                IProjectXmlAccessor _projectXmlAccessor = IProjectXmlAccessorFactory.Create(projectFile.Project);
                var provider            = new ConfigurationProjectConfigurationDimensionProvider(_projectXmlAccessor);
                var unconfiguredProject = UnconfiguredProjectFactory.Create(filePath: projectFile.Filename);
                var values = await provider.GetDefaultValuesForDimensionsAsync(unconfiguredProject);

                Assert.Single(values);
                var value = values.First();
                Assert.Equal(ConfigurationGeneral.ConfigurationProperty, value.Key);
                Assert.Equal("Debug", value.Value);
            }
        }