aboutsummaryrefslogtreecommitdiff
path: root/src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2020-06-25 14:43:50 -0700
committerRob Mensching <rob@firegiant.com>2020-06-25 14:50:31 -0700
commit38afa9e7bc7eacc021f8805f607368a05751e3c3 (patch)
tree803b0a8d9a06a7d6f7c4df408437017ae21a883e /src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs
parent8968578d50858721317d410549a9f9b5c62bf1f7 (diff)
downloadwix-38afa9e7bc7eacc021f8805f607368a05751e3c3.tar.gz
wix-38afa9e7bc7eacc021f8805f607368a05751e3c3.tar.bz2
wix-38afa9e7bc7eacc021f8805f607368a05751e3c3.zip
The Great Tuple to Symbol Rename (tm)
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs')
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs b/src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs
index 63771248..6ae2c0b8 100644
--- a/src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs
+++ b/src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs
@@ -9,7 +9,7 @@ namespace WixToolsetTest.CoreIntegration
9 using WixBuildTools.TestSupport; 9 using WixBuildTools.TestSupport;
10 using WixToolset.Core.TestPackage; 10 using WixToolset.Core.TestPackage;
11 using WixToolset.Data; 11 using WixToolset.Data;
12 using WixToolset.Data.Tuples; 12 using WixToolset.Data.Symbols;
13 using Xunit; 13 using Xunit;
14 14
15 public class WixlibFixture 15 public class WixlibFixture
@@ -80,11 +80,11 @@ namespace WixToolsetTest.CoreIntegration
80 result.AssertSuccess(); 80 result.AssertSuccess();
81 81
82 var wixlib = Intermediate.Load(wixlibPath); 82 var wixlib = Intermediate.Load(wixlibPath);
83 var binaryTuples = wixlib.Sections.SelectMany(s => s.Tuples).OfType<BinaryTuple>().ToList(); 83 var binarySymbols = wixlib.Sections.SelectMany(s => s.Symbols).OfType<BinarySymbol>().ToList();
84 Assert.Equal(3, binaryTuples.Count); 84 Assert.Equal(3, binarySymbols.Count);
85 Assert.Single(binaryTuples.Where(t => t.Data.Path == "wix-ir/foo.dll")); 85 Assert.Single(binarySymbols.Where(t => t.Data.Path == "wix-ir/foo.dll"));
86 Assert.Single(binaryTuples.Where(t => t.Data.Path == "wix-ir/foo.dll-1")); 86 Assert.Single(binarySymbols.Where(t => t.Data.Path == "wix-ir/foo.dll-1"));
87 Assert.Single(binaryTuples.Where(t => t.Data.Path == "wix-ir/foo.dll-2")); 87 Assert.Single(binarySymbols.Where(t => t.Data.Path == "wix-ir/foo.dll-2"));
88 } 88 }
89 } 89 }
90 90
@@ -138,9 +138,9 @@ namespace WixToolsetTest.CoreIntegration
138 138
139 var section = intermediate.Sections.Single(); 139 var section = intermediate.Sections.Single();
140 140
141 var wixFile = section.Tuples.OfType<FileTuple>().First(); 141 var wixFile = section.Symbols.OfType<FileSymbol>().First();
142 Assert.Equal(Path.Combine(folder, @"data\test.txt"), wixFile[FileTupleFields.Source].AsPath().Path); 142 Assert.Equal(Path.Combine(folder, @"data\test.txt"), wixFile[FileSymbolFields.Source].AsPath().Path);
143 Assert.Equal(@"test.txt", wixFile[FileTupleFields.Source].PreviousValue.AsPath().Path); 143 Assert.Equal(@"test.txt", wixFile[FileSymbolFields.Source].PreviousValue.AsPath().Path);
144 } 144 }
145 } 145 }
146 146
@@ -183,11 +183,11 @@ namespace WixToolsetTest.CoreIntegration
183 var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"bin\test.wixpdb")); 183 var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"bin\test.wixpdb"));
184 var section = intermediate.Sections.Single(); 184 var section = intermediate.Sections.Single();
185 185
186 var fileTuple = section.Tuples.OfType<FileTuple>().Single(); 186 var fileSymbol = section.Symbols.OfType<FileSymbol>().Single();
187 Assert.Equal(Path.Combine(folder, @"data\example.txt"), fileTuple[FileTupleFields.Source].AsPath().Path); 187 Assert.Equal(Path.Combine(folder, @"data\example.txt"), fileSymbol[FileSymbolFields.Source].AsPath().Path);
188 Assert.Equal(@"example.txt", fileTuple[FileTupleFields.Source].PreviousValue.AsPath().Path); 188 Assert.Equal(@"example.txt", fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath().Path);
189 189
190 var example = section.Tuples.Where(t => t.Definition.Type == TupleDefinitionType.MustBeFromAnExtension).Single(); 190 var example = section.Symbols.Where(t => t.Definition.Type == SymbolDefinitionType.MustBeFromAnExtension).Single();
191 Assert.Equal("Foo", example.Id?.Id); 191 Assert.Equal("Foo", example.Id?.Id);
192 Assert.Equal("Bar", example[0].AsString()); 192 Assert.Equal("Bar", example[0].AsString());
193 } 193 }
@@ -244,13 +244,13 @@ namespace WixToolsetTest.CoreIntegration
244 var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"bin\test.wixpdb")); 244 var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"bin\test.wixpdb"));
245 var section = intermediate.Sections.Single(); 245 var section = intermediate.Sections.Single();
246 246
247 var fileTuples = section.Tuples.OfType<FileTuple>().OrderBy(t => Path.GetFileName(t.Source.Path)).ToArray(); 247 var fileSymbols = section.Symbols.OfType<FileSymbol>().OrderBy(t => Path.GetFileName(t.Source.Path)).ToArray();
248 Assert.Equal(Path.Combine(folder, @"data\example.txt"), fileTuples[0][FileTupleFields.Source].AsPath().Path); 248 Assert.Equal(Path.Combine(folder, @"data\example.txt"), fileSymbols[0][FileSymbolFields.Source].AsPath().Path);
249 Assert.Equal(@"example.txt", fileTuples[0][FileTupleFields.Source].PreviousValue.AsPath().Path); 249 Assert.Equal(@"example.txt", fileSymbols[0][FileSymbolFields.Source].PreviousValue.AsPath().Path);
250 Assert.Equal(Path.Combine(folder, @"data\other.txt"), fileTuples[1][FileTupleFields.Source].AsPath().Path); 250 Assert.Equal(Path.Combine(folder, @"data\other.txt"), fileSymbols[1][FileSymbolFields.Source].AsPath().Path);
251 Assert.Equal(@"other.txt", fileTuples[1][FileTupleFields.Source].PreviousValue.AsPath().Path); 251 Assert.Equal(@"other.txt", fileSymbols[1][FileSymbolFields.Source].PreviousValue.AsPath().Path);
252 252
253 var examples = section.Tuples.Where(t => t.Definition.Type == TupleDefinitionType.MustBeFromAnExtension).ToArray(); 253 var examples = section.Symbols.Where(t => t.Definition.Type == SymbolDefinitionType.MustBeFromAnExtension).ToArray();
254 Assert.Equal(new string[] { "Foo", "Other" }, examples.Select(t => t.Id?.Id).ToArray()); 254 Assert.Equal(new string[] { "Foo", "Other" }, examples.Select(t => t.Id?.Id).ToArray());
255 Assert.Equal(new[] { "Bar", "Value" }, examples.Select(t => t[0].AsString()).ToArray()); 255 Assert.Equal(new[] { "Bar", "Value" }, examples.Select(t => t[0].AsString()).ToArray());
256 } 256 }