public void ParseSuggestedBindingRedirectsMetadata() { var parameter = ItemGroupParser.ParsePropertyOrItemList(@"Output Item(s): SuggestedBindingRedirects= Microsoft.Build, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a MaxVersion=15.1.0.0 Microsoft.VisualStudio.Validation, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a MaxVersion=15.3.0.0", MessageProcessor.OutputItemsMessagePrefix, new StringCache()) as Parameter; Assert.True(parameter != null); Assert.True(parameter.Children.Count == 2); var item = parameter.FirstChild as Item; Assert.True(item != null); var metadata = item.FirstChild as Metadata; Assert.True(metadata != null); Assert.Equal("SuggestedBindingRedirects", parameter.Name); Assert.Equal("Microsoft.Build, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", item.Text); Assert.Equal("MaxVersion", metadata.Name); Assert.Equal("15.1.0.0", metadata.Value); }
public void AddItemWithMultilineMetadata() { var result = ItemGroupParser.ParsePropertyOrItemList(@"Added Item(s): Link= tmp AcceptableNonZeroExitCodes= AdditionalDependencies=kernel32.lib;user32.lib; ;", MessageProcessor.OutputItemsMessagePrefix, new StringCache()); }
public void ParseMultilineMetadata() { var parameter = ItemGroupParser.ParsePropertyOrItemList(@"Added Item(s): _ProjectsFiles= Project1 AdditionalProperties= AutoParameterizationWebConfigConnectionStrings=false; _PackageTempDir=Out\Dir; Project2 AdditionalProperties= AutoParameterizationWebConfigConnectionStrings=false; _PackageTempDir=Out\Dir; Project3 AdditionalProperties= AutoParameterizationWebConfigConnectionStrings=false; _PackageTempDir=Out\Dir; ", MessageProcessor.ItemGroupIncludeMessagePrefix, new StringCache()) as Parameter; //Assert.Equal(3, parameter.Children.Count); }