public void Item_LocateFontsAndColorsItemsPropertyInUpperCase_ReturnsFontsAndColorsItemsProperty() { CreateProperties(); global::EnvDTE.Property property = properties.Item("FONTSANDCOLORSITEMS"); Assert.IsNotNull(property); }
public void Item_UnknownProperty_ReturnsNull() { CreateProperties(); global::EnvDTE.Property property = properties.Item("UnknownPropertyName"); Assert.IsNull(property); }
public void Item_LocateFontSizePropertyInUpperCase_ReturnsFontSizeProperty() { CreateProperties(); global::EnvDTE.Property property = properties.Item("FONTSIZE"); Assert.IsNotNull(property); }
public void GetEnumerator_GetStartupProjectPropertyWhenSolutionHasNoProjects_ReturnsPropertyWithEmptyStringAsValue() { CreateProperties(@"d:\projects\MyProject\MySolution.sln"); global::EnvDTE.Property property = PropertiesHelper.FindProperty(properties, "StartupProject"); object projectName = property.Value; Assert.AreEqual(String.Empty, projectName); }
public void GetEnumerator_GetPathProperty_ReturnsSolutionFileName() { CreateProperties(@"d:\projects\MyProject\MySolution.sln"); global::EnvDTE.Property property = PropertiesHelper.FindProperty(properties, "Path"); object path = property.Value; Assert.AreEqual(@"d:\projects\MyProject\MySolution.sln", path); }
public void Value_GetPathProperty_ReturnsSolutionFileName() { CreateProperties(@"d:\projects\MyProject\MySolution.sln"); global::EnvDTE.Property property = properties.Item("Path"); object path = property.Value; Assert.AreEqual(@"d:\projects\MyProject\MySolution.sln", path); }
public void GetEnumerator_TargetFrameworkVersionSetTo40_TargetFrameworkVersionPropertyReturned() { CreateProperties(); msbuildProject.SetProperty("TargetFrameworkVersion", "4.0"); global::EnvDTE.Property targetFrameworkVersionProperty = PropertiesHelper.FindProperty(project.Properties, "TargetFrameworkVersion"); string targetFrameworkVersion = targetFrameworkVersionProperty.Value as string; Assert.AreEqual("4.0", targetFrameworkVersion); }
public void GetEnumerator_GetStartupProjectPropertyWhenSolutionHasOneStartableProject_ReturnsStartupProjectName() { CreateProperties(@"d:\projects\MyProject\MySolution.sln"); AddStartupProject("MyProject", @"d:\projects\MyProject\MyProject.csproj"); global::EnvDTE.Property property = PropertiesHelper.FindProperty(properties, "StartupProject"); object projectName = property.Value; Assert.AreEqual("MyProject", projectName); }
public void Value_GetFullPathPropertyWithUpperCaseCharacters_ReturnsProjectDirectory() { CreateProperties(); msbuildProject.FileName = @"d:\projects\MyProject\MyProject.csproj"; global::EnvDTE.Property fullPathProperty = project.Properties.Item("FULLPATH"); string fullPath = fullPathProperty.Value as string; string expectedFullPath = @"d:\projects\MyProject"; Assert.AreEqual(expectedFullPath, fullPath); }
public void Value_GetLocalPathProperty_ReturnsProjectDirectory() { CreateProperties(); msbuildProject.FileName = @"d:\projects\MyProject\MyProject.csproj"; global::EnvDTE.Property localPathProperty = project.Properties.Item("LocalPath"); string localPath = localPathProperty.Value as string; string expectedLocalPath = @"d:\projects\MyProject\"; Assert.AreEqual(expectedLocalPath, localPath); }
public void Value_GetFullPathProperty_ReturnsProjectDirectory() { CreateProperties(); msbuildProject.FileName = new ICSharpCode.Core.FileName(@"d:\projects\MyProject\MyProject.csproj"); global::EnvDTE.Property fullPathProperty = project.Properties.Item("FullPath"); string fullPath = fullPathProperty.Value as string; string expectedFullPath = @"d:\projects\MyProject\"; Assert.AreEqual(expectedFullPath, fullPath); }
void AssertPropertiesContainProperty(string expectedPropertyName) { global::EnvDTE.Property property = PropertiesHelper.FindProperty(properties, expectedPropertyName); Assert.IsNotNull(property, "Unable to find property: " + expectedPropertyName); }