aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2020-04-18 13:53:54 +1000
committerSean Hall <r.sean.hall@gmail.com>2020-04-18 21:25:30 +1000
commit1c933963d1354495d4a31a08baf7f1240b5fbfce (patch)
treef2190fc0336f57d3c6b408e1a5d57b0b9c343092 /src/test
parent2b3c14c790e8a95edabecf2d7bb50baa58d8e95b (diff)
downloadwix-1c933963d1354495d4a31a08baf7f1240b5fbfce.tar.gz
wix-1c933963d1354495d4a31a08baf7f1240b5fbfce.tar.bz2
wix-1c933963d1354495d4a31a08baf7f1240b5fbfce.zip
Add ability for an extension to have a custom strongly typed row during binding.
Remove some unused functionality in Table and Row. Use strongRowType in core tables.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/WixToolsetTest.Data/WindowsInstallerTableDefinitionsFixture.cs29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.Data/WindowsInstallerTableDefinitionsFixture.cs b/src/test/WixToolsetTest.Data/WindowsInstallerTableDefinitionsFixture.cs
new file mode 100644
index 00000000..5621a756
--- /dev/null
+++ b/src/test/WixToolsetTest.Data/WindowsInstallerTableDefinitionsFixture.cs
@@ -0,0 +1,29 @@
1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3namespace WixToolsetTest.Data
4{
5 using WixToolset.Data.WindowsInstaller;
6 using Xunit;
7
8 public class WindowsInstallerTableDefinitionsFixture
9 {
10 [Fact]
11 public void CanCreateWindowsInstallerRows()
12 {
13 foreach (var tableDefinition in WindowsInstallerTableDefinitions.All)
14 {
15 var table = new Table(tableDefinition);
16 var rowFromTable = table.CreateRow(null);
17 var rowFromTableDefinition = tableDefinition.CreateRow(null);
18 var expectedRowTypeName = tableDefinition.Name.Replace("_", "") + "Row";
19 var expectedRowType = rowFromTable.GetType();
20
21 Assert.Equal(expectedRowType, rowFromTableDefinition.GetType());
22 if (typeof(Row) != expectedRowType)
23 {
24 Assert.Equal(expectedRowTypeName, expectedRowType.Name);
25 }
26 }
27 }
28 }
29}