public void Handle_WhenMSBuildProjectFullPathPropertyChangedAndMultitargeting_IncludeDimensionValuesInDisplayName(string dimensionNames, string dimensionValues, string implicitDimensionNames, string expected) { var context = IWorkspaceProjectContextMockFactory.Create(); var implicitlyActiveDimensionProvider = IImplicitlyActiveDimensionProviderFactory.ImplementGetImplicitlyActiveDimensions(n => implicitDimensionNames.SplitReturningEmptyIfEmpty('|')); var configuration = ProjectConfigurationFactory.Create(dimensionNames, dimensionValues); var handler = CreateInstance(configuration, implicitlyActiveDimensionProvider, context); var projectChange = SetupProjectChanges(true, "C:\\Project\\Project.csproj", true); Handle(handler, projectChange); Assert.Equal(expected, context.DisplayName); }
public void Handle_WhenMSBuildProjectFullPathPropertyChangedAndMultitargeting_IncludeDimensionValuesInDisplayName(string dimensionNames, string dimensionValues, string implicitDimensionNames, string expected) { var context = IWorkspaceProjectContextMockFactory.Create(); var implicitlyActiveDimensionProvider = IImplicitlyActiveDimensionProviderFactory.ImplementGetImplicitlyActiveDimensions(n => implicitDimensionNames.SplitReturningEmptyIfEmpty('|')); var configuration = ProjectConfigurationFactory.Create(dimensionNames, dimensionValues); var handler = CreateInstance(configuration, implicitlyActiveDimensionProvider, context); var projectChange = IProjectChangeDescriptionFactory.FromJson( @"{ ""Difference"": { ""AnyChanges"": true, ""ChangedProperties"": [ ""MSBuildProjectFullPath"" ] }, ""After"": { ""Properties"": { ""MSBuildProjectFullPath"": ""C:\\Project\\Project.csproj"" } } }"); Handle(handler, projectChange); Assert.Equal(expected, context.DisplayName); }