コード例 #1
0
        public void VsLangProjectProperties_FullPath()
        {
            var project = UnconfiguredProjectFactory.Create();
            var data    = new PropertyPageData()
            {
                Category     = ConfigurationGeneral.SchemaName,
                PropertyName = ConfigurationGeneral.TargetPathProperty,
                Value        = "somepath",
            };

            var projectProperties       = ProjectPropertiesFactory.Create(project, data);
            var activeConfiguredProject = ActiveConfiguredProjectFactory.ImplementValue(() => projectProperties);

            var vsLangProjectProperties = new VSProject(Mock.Of <VSLangProj.VSProject>(), IProjectThreadingServiceFactory.Create(), activeConfiguredProject);

            Assert.Equal(vsLangProjectProperties.FullPath, "somepath");
        }
コード例 #2
0
        public void VsLangProjectProperties_AbsoluteProjectDirectory()
        {
            var project = UnconfiguredProjectFactory.Create();
            var data    = new PropertyPageData()
            {
                Category     = ConfigurationGeneralBrowseObject.SchemaName,
                PropertyName = ConfigurationGeneralBrowseObject.FullPathProperty,
                Value        = "testvalue",
            };

            var projectProperties       = ProjectPropertiesFactory.Create(project, data);
            var activeConfiguredProject = ActiveConfiguredProjectFactory.ImplementValue(() => projectProperties);

            var vsLangProjectProperties = new VSProject(Mock.Of <VSLangProj.VSProject>(), IProjectThreadingServiceFactory.Create(), activeConfiguredProject);

            Assert.Equal(vsLangProjectProperties.AbsoluteProjectDirectory, "testvalue");
        }
コード例 #3
0
        public void VsLangProjectProperties_AssemblyName()
        {
            var setValues = new List <object>();
            var project   = UnconfiguredProjectFactory.Create();
            var data      = new PropertyPageData()
            {
                Category     = ConfigurationGeneral.SchemaName,
                PropertyName = ConfigurationGeneral.AssemblyNameProperty,
                Value        = "Blah",
                SetValues    = setValues
            };

            var projectProperties       = ProjectPropertiesFactory.Create(project, data);
            var activeConfiguredProject = ActiveConfiguredProjectFactory.ImplementValue(() => projectProperties);

            var vsLangProjectProperties = new VSProject(Mock.Of <VSLangProj.VSProject>(), IProjectThreadingServiceFactory.Create(), activeConfiguredProject);

            Assert.Equal(vsLangProjectProperties.AssemblyName, "Blah");

            var testValue = "Testing";

            vsLangProjectProperties.AssemblyName = testValue;
            Assert.Equal(setValues.Single(), testValue);
        }