@joebigelow / wix / commits / 1e3e48ac

Add failing test for AppId.

Sean Hall committed Oct 27, 2019 at 10:10 UTC 1e3e48ac376ca689d524fe69a7f1a40fcd1573df
3 files changed +45
src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs
+33
@@ -9,6 +9,39 @@ namespace WixToolsetTest.CoreIntegration
9
10 public class MsiQueryFixture
11 {
12 + [Fact(Skip = "Test demonstrates failure")]
13 + public void PopulatesAppIdTableWhenAdvertised()
14 + {
15 + var folder = TestData.Get(@"TestData");
16 +
17 + using (var fs = new DisposableFileSystem())
18 + {
19 + var baseFolder = fs.GetFolder();
20 + var intermediateFolder = Path.Combine(baseFolder, "obj");
21 + var msiPath = Path.Combine(baseFolder, @"bin\test.msi");
22 +
23 + var result = WixRunner.Execute(new[]
24 + {
25 + "build",
26 + Path.Combine(folder, "AppId", "Advertised.wxs"),
27 + Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"),
28 + Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"),
29 + "-bindpath", Path.Combine(folder, "SingleFile", "data"),
30 + "-intermediateFolder", intermediateFolder,
31 + "-o", msiPath
32 + });
33 +
34 + result.AssertSuccess();
35 +
36 + Assert.True(File.Exists(msiPath));
37 + var results = Query.QueryDatabase(msiPath, new[] { "AppId" });
38 + Assert.Equal(new[]
39 + {
40 + "AppId:{D6040299-B15C-4C94-AE26-0C9B60D14C35}\t\t\t\t\t\t",
41 + }, results);
42 + }
43 + }
44 +
45 [Fact]
46 public void PopulatesAppSearchTablesFromComponentSearch()
47 {
src/test/WixToolsetTest.CoreIntegration/TestData/AppId/Advertised.wxs new
+11
@@ -0,0 +1,11 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 + <Fragment>
4 + <ComponentGroup Id="ProductComponents">
5 + <Component Id="AppIdComp" Directory="INSTALLFOLDER" Guid="171BEE79-43CC-4A28-892F-7EFAC696FA4B">
6 + <File Id="AppIdComp.txt" Source="test.txt" Name="AppIdComp.txt"></File>
7 + <AppId Id="D6040299-B15C-4C94-AE26-0C9B60D14C35" Advertise="yes" />
8 + </Component>
9 + </ComponentGroup>
10 + </Fragment>
11 +</Wix>
src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj
+1
@@ -14,6 +14,7 @@
14
15 <ItemGroup>
16 <Content Include="TestData\.Data\burn.exe" CopyToOutputDirectory="PreserveNewest" />
17 + <Content Include="TestData\AppId\Advertised.wxs" CopyToOutputDirectory="PreserveNewest" />
18 <Content Include="TestData\AppSearch\ComponentSearch.wxs" CopyToOutputDirectory="PreserveNewest" />
19 <Content Include="TestData\AppSearch\DirectorySearch.wxs" CopyToOutputDirectory="PreserveNewest" />
20 <Content Include="TestData\AppSearch\FileSearch.wxs" CopyToOutputDirectory="PreserveNewest" />