From 38afa9e7bc7eacc021f8805f607368a05751e3c3 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Thu, 25 Jun 2020 14:43:50 -0700 Subject: The Great Tuple to Symbol Rename (tm) --- .../WixToolsetTest.CoreIntegration/MsiFixture.cs | 76 +++++++++++----------- 1 file changed, 38 insertions(+), 38 deletions(-) (limited to 'src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs') diff --git a/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs b/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs index fbfebc5b..740d58c7 100644 --- a/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs @@ -9,7 +9,7 @@ namespace WixToolsetTest.CoreIntegration using WixBuildTools.TestSupport; using WixToolset.Core.TestPackage; using WixToolset.Data; - using WixToolset.Data.Tuples; + using WixToolset.Data.Symbols; using WixToolset.Data.WindowsInstaller; using Xunit; @@ -51,9 +51,9 @@ namespace WixToolsetTest.CoreIntegration var section = intermediate.Sections.Single(); - var fileTuple = section.Tuples.OfType().First(); - Assert.Equal(Path.Combine(folder, @"data\test.txt"), fileTuple[FileTupleFields.Source].AsPath().Path); - Assert.Equal(@"test.txt", fileTuple[FileTupleFields.Source].PreviousValue.AsPath().Path); + var fileSymbol = section.Symbols.OfType().First(); + Assert.Equal(Path.Combine(folder, @"data\test.txt"), fileSymbol[FileSymbolFields.Source].AsPath().Path); + Assert.Equal(@"test.txt", fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath().Path); } } @@ -86,9 +86,9 @@ namespace WixToolsetTest.CoreIntegration var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"bin\test.wixpdb")); var section = intermediate.Sections.Single(); - var fileTuple = section.Tuples.OfType().Single(); - Assert.Equal(Path.Combine(folder, @"data\test.txt"), fileTuple[FileTupleFields.Source].AsPath().Path); - Assert.Equal(@"test.txt", fileTuple[FileTupleFields.Source].PreviousValue.AsPath().Path); + var fileSymbol = section.Symbols.OfType().Single(); + Assert.Equal(Path.Combine(folder, @"data\test.txt"), fileSymbol[FileSymbolFields.Source].AsPath().Path); + Assert.Equal(@"test.txt", fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath().Path); } } @@ -244,14 +244,14 @@ namespace WixToolsetTest.CoreIntegration var intermediate = Intermediate.Load(Path.Combine(baseFolder, @"bin\test.wixpdb")); var section = intermediate.Sections.Single(); - var errors = section.Tuples.OfType().ToDictionary(t => t.Id.Id); + var errors = section.Symbols.OfType().ToDictionary(t => t.Id.Id); Assert.Equal("Category 55 Emergency Doomsday Crisis", errors["1234"].Message.Trim()); Assert.Equal(" ", errors["5678"].Message); - var customAction1 = section.Tuples.OfType().Where(t => t.Id.Id == "CanWeReferenceAnError_YesWeCan").Single(); + var customAction1 = section.Symbols.OfType().Where(t => t.Id.Id == "CanWeReferenceAnError_YesWeCan").Single(); Assert.Equal("1234", customAction1.Target); - var customAction2 = section.Tuples.OfType().Where(t => t.Id.Id == "TextErrorsWorkOKToo").Single(); + var customAction2 = section.Symbols.OfType().Where(t => t.Id.Id == "TextErrorsWorkOKToo").Single(); Assert.Equal("If you see this, something went wrong.", customAction2.Target); } } @@ -353,10 +353,10 @@ namespace WixToolsetTest.CoreIntegration var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"bin\test.wixpdb")); var section = intermediate.Sections.Single(); - var fileTuple = section.Tuples.OfType().Single(); - Assert.Equal("filyIq8rqcxxf903Hsn5K9L0SWV73g", fileTuple.Id.Id); - Assert.Equal(Path.Combine(folder, @"data\test.txt"), fileTuple[FileTupleFields.Source].AsPath().Path); - Assert.Equal(@"test.txt", fileTuple[FileTupleFields.Source].PreviousValue.AsPath().Path); + var fileSymbol = section.Symbols.OfType().Single(); + Assert.Equal("filyIq8rqcxxf903Hsn5K9L0SWV73g", fileSymbol.Id.Id); + Assert.Equal(Path.Combine(folder, @"data\test.txt"), fileSymbol[FileSymbolFields.Source].AsPath().Path); + Assert.Equal(@"test.txt", fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath().Path); var data = WindowsInstallerData.Load(Path.Combine(intermediateFolder, @"bin\test.wixpdb")); var fileRows = data.Tables["File"].Rows; @@ -405,15 +405,15 @@ namespace WixToolsetTest.CoreIntegration var intermediate = Intermediate.Load(pdbPath); var section = intermediate.Sections.Single(); - var upgradeTuple = section.Tuples.OfType().Single(); - Assert.False(upgradeTuple.ExcludeLanguages); - Assert.True(upgradeTuple.IgnoreRemoveFailures); - Assert.False(upgradeTuple.VersionMaxInclusive); - Assert.True(upgradeTuple.VersionMinInclusive); - Assert.Equal("13.0.0", upgradeTuple.VersionMax); - Assert.Equal("12.0.0", upgradeTuple.VersionMin); - Assert.False(upgradeTuple.OnlyDetect); - Assert.Equal("BLAHBLAHBLAH", upgradeTuple.ActionProperty); + var upgradeSymbol = section.Symbols.OfType().Single(); + Assert.False(upgradeSymbol.ExcludeLanguages); + Assert.True(upgradeSymbol.IgnoreRemoveFailures); + Assert.False(upgradeSymbol.VersionMaxInclusive); + Assert.True(upgradeSymbol.VersionMinInclusive); + Assert.Equal("13.0.0", upgradeSymbol.VersionMax); + Assert.Equal("12.0.0", upgradeSymbol.VersionMin); + Assert.False(upgradeSymbol.OnlyDetect); + Assert.Equal("BLAHBLAHBLAH", upgradeSymbol.ActionProperty); var pdb = WindowsInstallerData.Load(pdbPath, suppressVersionCheck: false); var secureProperties = pdb.Tables["Property"].Rows.Where(row => row.GetKey() == "SecureCustomProperties").Single(); @@ -581,9 +581,9 @@ namespace WixToolsetTest.CoreIntegration var intermediate = Intermediate.Load(Path.Combine(baseFolder, @"bin\test.wixpdb")); var section = intermediate.Sections.Single(); - var fileTuple = section.Tuples.OfType().Single(); - Assert.Equal(Path.Combine(folder, @"data\test.txt"), fileTuple[FileTupleFields.Source].AsPath().Path); - Assert.Equal(@"test.txt", fileTuple[FileTupleFields.Source].PreviousValue.AsPath().Path); + var fileSymbol = section.Symbols.OfType().Single(); + Assert.Equal(Path.Combine(folder, @"data\test.txt"), fileSymbol[FileSymbolFields.Source].AsPath().Path); + Assert.Equal(@"test.txt", fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath().Path); } } @@ -617,11 +617,11 @@ namespace WixToolsetTest.CoreIntegration var intermediate = Intermediate.Load(Path.Combine(baseFolder, @"bin\test.wixpdb")); var section = intermediate.Sections.Single(); - var fileTuple = section.Tuples.OfType().Single(); - Assert.Equal(Path.Combine(folder, @"data\candle.exe"), fileTuple[FileTupleFields.Source].AsPath().Path); - Assert.Equal(@"candle.exe", fileTuple[FileTupleFields.Source].PreviousValue.AsPath().Path); + var fileSymbol = section.Symbols.OfType().Single(); + Assert.Equal(Path.Combine(folder, @"data\candle.exe"), fileSymbol[FileSymbolFields.Source].AsPath().Path); + Assert.Equal(@"candle.exe", fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath().Path); - var msiAssemblyNameTuples = section.Tuples.OfType(); + var msiAssemblyNameSymbols = section.Symbols.OfType(); Assert.Equal(new[] { "culture", @@ -630,7 +630,7 @@ namespace WixToolsetTest.CoreIntegration "processorArchitecture", "publicKeyToken", "version" - }, msiAssemblyNameTuples.OrderBy(a => a.Name).Select(a => a.Name).ToArray()); + }, msiAssemblyNameSymbols.OrderBy(a => a.Name).Select(a => a.Name).ToArray()); Assert.Equal(new[] { @@ -640,7 +640,7 @@ namespace WixToolsetTest.CoreIntegration "x86", "256B3414DFA97718", "3.0.0.0" - }, msiAssemblyNameTuples.OrderBy(a => a.Name).Select(a => a.Value).ToArray()); + }, msiAssemblyNameSymbols.OrderBy(a => a.Name).Select(a => a.Value).ToArray()); } } @@ -671,7 +671,7 @@ namespace WixToolsetTest.CoreIntegration var intermediate = Intermediate.Load(Path.Combine(baseFolder, @"bin\test.wixpdb")); var section = intermediate.Sections.Single(); - var platformSummary = section.Tuples.OfType().Single(s => s.PropertyId == SummaryInformationType.PlatformAndLanguage); + var platformSummary = section.Symbols.OfType().Single(s => s.PropertyId == SummaryInformationType.PlatformAndLanguage); Assert.Equal("x64;1033", platformSummary.Value); } } @@ -704,12 +704,12 @@ namespace WixToolsetTest.CoreIntegration var section = intermediate.Sections.Single(); // Only one component is shared. - var sharedComponentTuples = section.Tuples.OfType(); - Assert.Equal(1, sharedComponentTuples.Sum(t => t.Shared ? 1 : 0)); + var sharedComponentSymbols = section.Symbols.OfType(); + Assert.Equal(1, sharedComponentSymbols.Sum(t => t.Shared ? 1 : 0)); // And it is this one. - var sharedComponentTuple = sharedComponentTuples.Single(t => t.Id.Id == "Shared.dll"); - Assert.True(sharedComponentTuple.Shared); + var sharedComponentSymbol = sharedComponentSymbols.Single(t => t.Id.Id == "Shared.dll"); + Assert.True(sharedComponentSymbol.Shared); } } @@ -775,7 +775,7 @@ namespace WixToolsetTest.CoreIntegration var intermediate = Intermediate.Load(Path.Combine(baseFolder, @"bin\test.wixpdb")); var section = intermediate.Sections.Single(); - var progids = section.Tuples.OfType().OrderBy(tuple => tuple.ProgId).ToList(); + var progids = section.Symbols.OfType().OrderBy(symbol => symbol.ProgId).ToList(); Assert.Equal(new[] { "Foo.File.hol", -- cgit v1.2.3-55-g6feb