Add tests for WixBA.
Sean Hall committed
May 6, 2021 at 14:42 UTC
a91c413750b354ba6975be9d427787b13664b750
16 files changed
+202
-149
src/test/burn/BurnE2ETests.sln
+14
@@ -9,6 +9,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestExe", "TestExe\TestExe.
9
EndProject
10
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixTestTools", "WixTestTools\WixTestTools.csproj", "{3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}"
11
EndProject
12
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.WixBA", "WixToolset.WixBA\WixToolset.WixBA.csproj", "{7C27518B-84AD-4679-8EF4-29DF552CF1AC}"
13
+EndProject
14
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.BurnE2E", "WixToolsetTest.BurnE2E\WixToolsetTest.BurnE2E.csproj", "{FED9D707-E5C3-4867-87B0-FABDB5EB0823}"
15
EndProject
16
Global
@@ -69,6 +71,18 @@ Global
71
{FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Release|x64.Build.0 = Release|Any CPU
72
{FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Release|x86.ActiveCfg = Release|Any CPU
73
{FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Release|x86.Build.0 = Release|Any CPU
74
+ {7C27518B-84AD-4679-8EF4-29DF552CF1AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
75
+ {7C27518B-84AD-4679-8EF4-29DF552CF1AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
76
+ {7C27518B-84AD-4679-8EF4-29DF552CF1AC}.Debug|x64.ActiveCfg = Debug|Any CPU
77
+ {7C27518B-84AD-4679-8EF4-29DF552CF1AC}.Debug|x64.Build.0 = Debug|Any CPU
78
+ {7C27518B-84AD-4679-8EF4-29DF552CF1AC}.Debug|x86.ActiveCfg = Debug|Any CPU
79
+ {7C27518B-84AD-4679-8EF4-29DF552CF1AC}.Debug|x86.Build.0 = Debug|Any CPU
80
+ {7C27518B-84AD-4679-8EF4-29DF552CF1AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
81
+ {7C27518B-84AD-4679-8EF4-29DF552CF1AC}.Release|Any CPU.Build.0 = Release|Any CPU
82
+ {7C27518B-84AD-4679-8EF4-29DF552CF1AC}.Release|x64.ActiveCfg = Release|Any CPU
83
+ {7C27518B-84AD-4679-8EF4-29DF552CF1AC}.Release|x64.Build.0 = Release|Any CPU
84
+ {7C27518B-84AD-4679-8EF4-29DF552CF1AC}.Release|x86.ActiveCfg = Release|Any CPU
85
+ {7C27518B-84AD-4679-8EF4-29DF552CF1AC}.Release|x86.Build.0 = Release|Any CPU
86
EndGlobalSection
87
GlobalSection(SolutionProperties) = preSolution
88
HideSolutionNode = FALSE
src/test/burn/TestData/BasicFunctionalityTests/BundleD/BundleD.wixproj
new
+20
@@ -0,0 +1,20 @@
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
+<Project Sdk="WixToolset.Sdk">
3
+ <PropertyGroup>
4
+ <OutputType>Bundle</OutputType>
5
+ <BA>WixBA</BA>
6
+ <UpgradeCode>{2557AA80-E432-48BF-BF01-DD27DD1BD291}</UpgradeCode>
7
+ </PropertyGroup>
8
+ <ItemGroup>
9
+ <Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" />
10
+ <Compile Include="..\BundleA\BundleA.wxs" Link="BundleD.wxs" />
11
+ </ItemGroup>
12
+ <ItemGroup>
13
+ <ProjectReference Include="..\PackageA\PackageA.wixproj" />
14
+ <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
15
+ </ItemGroup>
16
+ <ItemGroup>
17
+ <PackageReference Include="WixToolset.Bal.wixext" />
18
+ <PackageReference Include="WixToolset.NetFx.wixext" />
19
+ </ItemGroup>
20
+</Project>
\ No newline at end of file
src/test/burn/TestData/BasicFunctionalityTests/BundleD_x64/BundleD_x64.wixproj
new
+21
@@ -0,0 +1,21 @@
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
+<Project Sdk="WixToolset.Sdk">
3
+ <PropertyGroup>
4
+ <OutputType>Bundle</OutputType>
5
+ <BA>WixBAdnc_x64</BA>
6
+ <UpgradeCode>{62E3DFA4-6849-44F0-93A1-C8F60DBB76E3}</UpgradeCode>
7
+ <InstallerPlatform>x64</InstallerPlatform>
8
+ </PropertyGroup>
9
+ <ItemGroup>
10
+ <Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" />
11
+ <Compile Include="..\BundleA_x64\BundleA_x64.wxs" Link="BundleD_x64.wxs" />
12
+ </ItemGroup>
13
+ <ItemGroup>
14
+ <ProjectReference Include="..\PackageA_x64\PackageA_x64.wixproj" />
15
+ <ProjectReference Include="..\..\TestBA\TestBAWixlib_x64\testbawixlib_x64.wixproj" />
16
+ </ItemGroup>
17
+ <ItemGroup>
18
+ <PackageReference Include="WixToolset.Bal.wixext" />
19
+ <PackageReference Include="WixToolset.NetFx.wixext" />
20
+ </ItemGroup>
21
+</Project>
\ No newline at end of file
src/test/burn/TestData/Templates/Bundle.wxs
+8
@@ -22,6 +22,10 @@
22
<!-- pulled in through the PackageGroupRef below -->
23
<?elseif $(var.BA) = "TestBAdnc_x64"?>
24
<!-- pulled in through the PackageGroupRef below -->
25
+ <?elseif $(var.BA) = "WixBA"?>
26
+ <!-- pulled in through the PackageGroupRef below -->
27
+ <?elseif $(var.BA) = "WixBAdnc_x64"?>
28
+ <!-- pulled in through the PackageGroupRef below -->
29
<?elseif $(var.BA) = "hyperlinkLicense"?>
30
<BootstrapperApplication>
31
<bal:WixStandardBootstrapperApplication LicenseUrl="" Theme="hyperlinkLicense" />
@@ -39,6 +43,10 @@
43
<PackageGroupRef Id="TestBA_x64" />
44
<?elseif $(var.BA) = "TestBAdnc_x64"?>
45
<PackageGroupRef Id="TestBAdnc_x64" />
46
+ <?elseif $(var.BA) = "WixBA"?>
47
+ <PackageGroupRef Id="WixBA" />
48
+ <?elseif $(var.BA) = "WixBAdnc_x64"?>
49
+ <PackageGroupRef Id="WixBAdnc_x64" />
50
<?endif?>
51
52
<PackageGroupRef Id="BundlePackages" />
src/test/burn/TestData/TestBA/TestBAWixlib/WixBA.wxs
new
+17
@@ -0,0 +1,17 @@
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
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
3
+ <Fragment>
4
+ <BootstrapperApplication>
5
+ <Payload Name="WixToolset.Mba.Host.config" SourceFile="!(bindpath.net4x86)\WixBA.BootstrapperCore.config" />
6
+ <Payload SourceFile="!(bindpath.net4x86)\WixToolset.WixBA.dll" />
7
+ <Payload SourceFile="!(bindpath.net4x86)\mbanative.dll" />
8
+ <Payload SourceFile="!(bindpath.net4x86)\WixToolset.Mba.Core.dll" />
9
+ <Payload SourceFile='..\..\..\..\..\..\License.txt' />
10
+ <bal:WixManagedBootstrapperApplicationHost />
11
+ </BootstrapperApplication>
12
+
13
+ <PackageGroup Id="WixBA">
14
+ <PackageGroupRef Id="NetFx48WebAsPrereq" />
15
+ </PackageGroup>
16
+ </Fragment>
17
+</Wix>
src/test/burn/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj
+2
@@ -7,11 +7,13 @@
7
</PropertyGroup>
8
<ItemGroup>
9
<BindInputPaths Include="$(BaseOutputPath)$(Configuration)\net35\win-x86" BindName="net2x86" />
10
+ <BindInputPaths Include="$(BaseOutputPath)$(Configuration)\net45\win-x86" BindName="net4x86" />
11
<BindInputPaths Include="$(BaseOutputPath)$(Configuration)\net5.0-windows\win-x86" BindName="dnc5x86" />
12
</ItemGroup>
13
<ItemGroup>
14
<ProjectReference Include="..\..\..\TestBA\TestBA.csproj" />
15
<ProjectReference Include="..\..\..\TestExe\TestExe.csproj" />
16
+ <ProjectReference Include="..\..\..\WixToolset.WixBA\WixToolset.WixBA.csproj" />
17
</ItemGroup>
18
<ItemGroup>
19
<PackageReference Include="WixToolset.Bal.wixext" />
src/test/burn/TestData/TestBA/TestBAWixlib_x64/WixBA_x64.wxs
new
+18
@@ -0,0 +1,18 @@
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
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
3
+ <Fragment>
4
+ <BootstrapperApplication>
5
+ <Payload SourceFile="!(bindpath.dnc5x64)\WixToolset.WixBA.deps.json" />
6
+ <Payload SourceFile="!(bindpath.dnc5x64)\WixToolset.WixBA.dll" bal:BAFactoryAssembly="yes" />
7
+ <Payload SourceFile="!(bindpath.dnc5x64)\WixToolset.WixBA.runtimeconfig.json" />
8
+ <Payload SourceFile="!(bindpath.dnc5x64)\mbanative.dll" />
9
+ <Payload SourceFile="!(bindpath.dnc5x64)\WixToolset.Mba.Core.dll" />
10
+ <Payload SourceFile='..\..\..\..\..\..\License.txt' />
11
+ <bal:WixDotNetCoreBootstrapperApplicationHost />
12
+ </BootstrapperApplication>
13
+
14
+ <PackageGroup Id="WixBAdnc_x64">
15
+ <PackageGroupRef Id="NetFx48WebAsPrereq" /> <!-- Yes, this is wrong but we don't have .NET 5 packages yet -->
16
+ </PackageGroup>
17
+ </Fragment>
18
+</Wix>
src/test/burn/TestData/TestBA/TestBAWixlib_x64/testbawixlib_x64.wixproj
+2
@@ -8,11 +8,13 @@
8
</PropertyGroup>
9
<ItemGroup>
10
<BindInputPaths Include="$(BaseOutputPath)$(Configuration)\net35\win-x64" BindName="net2x64" />
11
+ <BindInputPaths Include="$(BaseOutputPath)$(Configuration)\net45\win-x64" BindName="net4x64" />
12
<BindInputPaths Include="$(BaseOutputPath)$(Configuration)\net5.0-windows\win-x64" BindName="dnc5x64" />
13
</ItemGroup>
14
<ItemGroup>
15
<ProjectReference Include="..\..\..\TestBA\TestBA_x64.csproj" />
16
<ProjectReference Include="..\..\..\TestExe\TestExe_x64.csproj" />
17
+ <ProjectReference Include="..\..\..\WixToolset.WixBA\WixToolset.WixBA_x64.csproj" />
18
</ItemGroup>
19
<ItemGroup>
20
<PackageReference Include="WixToolset.Bal.wixext" />
src/test/burn/WixToolset.WixBA/InstallationViewModel.cs
+2
-2
@@ -461,8 +461,8 @@ namespace WixToolset.WixBA
461
462
private void PlanPackageBegin(object sender, PlanPackageBeginEventArgs e)
463
{
464
- // If we're able to run our BA, we don't want to install the .NET Framework since the framework on the machine is already good enough.
465
- if ( e.PackageId.StartsWith("NetFx4", StringComparison.OrdinalIgnoreCase))
464
+ // If we're able to run our BA, we don't want to install .NET since the one on the machine is already good enough.
465
+ if (e.PackageId.StartsWith("NetFx4", StringComparison.OrdinalIgnoreCase) || e.PackageId.StartsWith("DesktopNetCoreRuntime", StringComparison.OrdinalIgnoreCase))
466
{
467
e.State = RequestState.None;
468
}
src/test/burn/WixToolset.WixBA/RootView.xaml
+1
-1
@@ -19,7 +19,7 @@
19
<Window.Resources>
20
<ResourceDictionary>
21
<ResourceDictionary.MergedDictionaries>
22
- <ResourceDictionary Source="pack://application:,,,/WixBA;component/Styles.xaml" />
22
+ <ResourceDictionary Source="pack://application:,,,/WixToolset.WixBA;component/Styles.xaml" />
23
</ResourceDictionary.MergedDictionaries>
24
</ResourceDictionary>
25
</Window.Resources>
src/test/burn/WixToolset.WixBA/Styles.xaml
+2
-2
@@ -18,8 +18,8 @@
18
<System:Double x:Key="FontSizeButton">14</System:Double>
19
20
<!-- Images -->
21
- <BitmapImage x:Key="LogoOverLightBackground" UriSource="pack://application:,,,/WixBA;component/resources/logo-white-hollow.png" />
22
- <BitmapImage x:Key="LogoOverDarkBackground" UriSource="pack://application:,,,/WixBA;component/resources/logo-black-hollow.png" />
21
+ <BitmapImage x:Key="LogoOverLightBackground" UriSource="pack://application:,,,/WixToolset.WixBA;component/resources/logo-white-hollow.png" />
22
+ <BitmapImage x:Key="LogoOverDarkBackground" UriSource="pack://application:,,,/WixToolset.WixBA;component/resources/logo-black-hollow.png" />
23
24
<!-- Colors -->
25
<Color x:Key="ProgressIndicatorColor">#FF1EF1E8</Color>
src/test/burn/WixToolset.WixBA/UpdateViewModel.cs
+10
-1
@@ -38,6 +38,7 @@ namespace WixToolset.WixBA
38
WixBA.Model.Bootstrapper.DetectUpdateBegin += this.DetectUpdateBegin;
39
WixBA.Model.Bootstrapper.DetectUpdate += this.DetectUpdate;
40
WixBA.Model.Bootstrapper.DetectUpdateComplete += this.DetectUpdateComplete;
41
+ WixBA.Model.Bootstrapper.DetectComplete += this.DetectComplete;
42
43
this.root.PropertyChanged += new PropertyChangedEventHandler(this.RootPropertyChanged);
44
@@ -201,7 +202,15 @@ namespace WixToolset.WixBA
202
else if ((LaunchAction.Uninstall == WixBA.Model.Command.Action) || (UpdateState.Initializing == this.State) || (UpdateState.Checking == this.State))
203
{
204
this.State = UpdateState.Unknown;
204
- }
205
+ }
206
+ }
207
+
208
+ private void DetectComplete(object sender, DetectCompleteEventArgs e)
209
+ {
210
+ if (this.State == UpdateState.Initializing || this.State == UpdateState.Checking)
211
+ {
212
+ this.State = UpdateState.Unknown;
213
+ }
214
}
215
}
216
}
src/test/burn/WixToolset.WixBA/WixBA.cs
+4
-4
@@ -163,19 +163,19 @@ namespace WixToolset.WixBA
163
WixBA.Model = new Model(this);
164
WixBA.Dispatcher = Threading.Dispatcher.CurrentDispatcher;
165
RootViewModel viewModel = new RootViewModel();
166
-
167
- // Kick off detect which will populate the view models.
168
- this.Engine.Detect();
166
+ WixBA.View = new RootView(viewModel);
167
168
// Create a Window to show UI.
169
if (WixBA.Model.Command.Display == Display.Passive ||
170
WixBA.Model.Command.Display == Display.Full)
171
{
172
this.Engine.Log(LogLevel.Verbose, "Creating a UI.");
175
- WixBA.View = new RootView(viewModel);
173
WixBA.View.Show();
174
}
175
176
+ // Kick off detect which will populate the view models.
177
+ this.Engine.Detect();
178
+
179
Threading.Dispatcher.Run();
180
181
this.PostTelemetry();
src/test/burn/WixToolset.WixBA/WixToolset.WixBA.csproj
+10
-20
@@ -2,7 +2,7 @@
2
<!-- 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. -->
3
<Project Sdk="Microsoft.NET.Sdk">
4
<PropertyGroup>
5
- <TargetFramework>net45</TargetFramework>
5
+ <TargetFrameworks>net45;net5.0-windows</TargetFrameworks>
6
<AssemblyName>WixToolset.WixBA</AssemblyName>
7
<RootNamespace>WixToolset.WixBA</RootNamespace>
8
<DebugType>embedded</DebugType>
@@ -13,38 +13,28 @@
13
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
14
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
15
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
16
+ <EnableDynamicLoading>true</EnableDynamicLoading>
17
+ <UseWPF>true</UseWPF>
18
+ <RollForward>Major</RollForward>
19
+ <!-- https://stackoverflow.com/questions/58844785/how-to-reference-system-windows-forms-in-net-core-3-0-for-wpf-apps -->
20
+ <UseWindowsForms>true</UseWindowsForms>
21
</PropertyGroup>
17
- <ItemGroup>
18
- <Page Include="Styles.xaml">
19
- <Generator>MSBuild:Compile</Generator>
20
- <SubType>Designer</SubType>
21
- </Page>
22
- <Page Include="RootView.xaml">
23
- <Generator>MSBuild:Compile</Generator>
24
- <SubType>Designer</SubType>
25
- </Page>
26
- <None Include="WixBA.BootstrapperCore.config">
27
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
28
- <SubType>Designer</SubType>
29
- </None>
22
+ <ItemGroup Condition="'$(TargetFramework)'=='net45'">
23
+ <Content Include="WixBA.BootstrapperCore.config" CopyToOutputDirectory="PreserveNewest" />
24
</ItemGroup>
25
<ItemGroup>
26
<Resource Include="Resources\logo-white-hollow.png" />
27
<Resource Include="Resources\logo-black-hollow.png" />
28
</ItemGroup>
35
- <ItemGroup>
29
+ <ItemGroup Condition="'$(TargetFramework)'=='net45'">
30
<Reference Include="PresentationCore" />
31
<Reference Include="PresentationFramework" />
32
<Reference Include="System.Windows.Forms" />
33
<Reference Include="System.Xaml" />
34
<Reference Include="WindowsBase" />
35
</ItemGroup>
42
- <ItemGroup>
43
- <PackageReference Include="WixToolset.Mba.Core" Version="4.0.0-preview.0-build.0" />
44
- </ItemGroup>
36
37
<ItemGroup>
47
- <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
48
- <PackageReference Include="GitInfo" Version="2.1.2" PrivateAssets="All" />
38
+ <PackageReference Include="WixToolset.Mba.Core" />
39
</ItemGroup>
40
</Project>
\ No newline at end of file
src/test/burn/WixToolset.WixBA/WixToolset.WixBA_x64.csproj
new
+40
@@ -0,0 +1,40 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- 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. -->
3
+<Project Sdk="Microsoft.NET.Sdk">
4
+ <PropertyGroup>
5
+ <TargetFrameworks>net45;net5.0-windows</TargetFrameworks>
6
+ <AssemblyName>WixToolset.WixBA</AssemblyName>
7
+ <RootNamespace>WixToolset.WixBA</RootNamespace>
8
+ <DebugType>embedded</DebugType>
9
+ <RuntimeIdentifier>win-x64</RuntimeIdentifier>
10
+ <AssemblyTitle>WixToolset.WixBA</AssemblyTitle>
11
+ <Description>WiX Bootstrapper Application</Description>
12
+ <GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
13
+ <GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
14
+ <GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
15
+ <GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
16
+ <EnableDynamicLoading>true</EnableDynamicLoading>
17
+ <UseWPF>true</UseWPF>
18
+ <RollForward>Major</RollForward>
19
+ <!-- https://stackoverflow.com/questions/58844785/how-to-reference-system-windows-forms-in-net-core-3-0-for-wpf-apps -->
20
+ <UseWindowsForms>true</UseWindowsForms>
21
+ </PropertyGroup>
22
+ <ItemGroup Condition="'$(TargetFramework)'=='net45'">
23
+ <Content Include="WixBA.BootstrapperCore.config" CopyToOutputDirectory="PreserveNewest" />
24
+ </ItemGroup>
25
+ <ItemGroup>
26
+ <Resource Include="Resources\logo-white-hollow.png" />
27
+ <Resource Include="Resources\logo-black-hollow.png" />
28
+ </ItemGroup>
29
+ <ItemGroup Condition="'$(TargetFramework)'=='net45'">
30
+ <Reference Include="PresentationCore" />
31
+ <Reference Include="PresentationFramework" />
32
+ <Reference Include="System.Windows.Forms" />
33
+ <Reference Include="System.Xaml" />
34
+ <Reference Include="WindowsBase" />
35
+ </ItemGroup>
36
+
37
+ <ItemGroup>
38
+ <PackageReference Include="WixToolset.Mba.Core" />
39
+ </ItemGroup>
40
+</Project>
\ No newline at end of file
src/test/burn/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs
+31
-119
@@ -14,163 +14,75 @@ namespace WixToolsetTest.BurnE2E
14
[Fact]
15
public void CanInstallAndUninstallSimpleBundle_x86_wixstdba()
16
{
17
- var packageA = this.CreatePackageInstaller("PackageA");
18
-
19
- var bundleA = this.CreateBundleInstaller("BundleA");
20
-
21
- var packageASourceCodeInstalled = packageA.GetInstalledFilePath("Package.wxs");
22
-
23
- // Source file should *not* be installed
24
- Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A payload should not be there on test start: {packageASourceCodeInstalled}");
25
-
26
- bundleA.Install();
27
-
28
- var cachedBundlePath = bundleA.VerifyRegisteredAndInPackageCache();
29
-
30
- // Source file should be installed
31
- Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A payload installed at: ", packageASourceCodeInstalled));
32
-
33
- bundleA.Uninstall(cachedBundlePath);
34
-
35
- // Source file should *not* be installed
36
- Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Package A payload should have been removed by uninstall from: ", packageASourceCodeInstalled));
37
-
38
- bundleA.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath);
17
+ this.CanInstallAndUninstallSimpleBundle("PackageA", "BundleA");
18
}
19
20
[Fact]
21
public void CanInstallAndUninstallSimpleBundle_x86_testba()
22
{
44
- var packageA = this.CreatePackageInstaller("PackageA");
45
-
46
- var bundleB = this.CreateBundleInstaller("BundleB");
47
-
48
- var packageASourceCodeInstalled = packageA.GetInstalledFilePath("Package.wxs");
49
-
50
- // Source file should *not* be installed
51
- Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A payload should not be there on test start: {packageASourceCodeInstalled}");
52
-
53
- bundleB.Install();
54
-
55
- var cachedBundlePath = bundleB.VerifyRegisteredAndInPackageCache();
56
-
57
- // Source file should be installed
58
- Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A payload installed at: ", packageASourceCodeInstalled));
59
-
60
- bundleB.Uninstall(cachedBundlePath);
61
-
62
- // Source file should *not* be installed
63
- Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Package A payload should have been removed by uninstall from: ", packageASourceCodeInstalled));
64
-
65
- bundleB.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath);
23
+ this.CanInstallAndUninstallSimpleBundle("PackageA", "BundleB");
24
}
25
26
[Fact]
27
public void CanInstallAndUninstallSimpleBundle_x86_dnctestba()
28
{
71
- var packageA = this.CreatePackageInstaller("PackageA");
72
-
73
- var bundleC = this.CreateBundleInstaller("BundleC");
74
-
75
- var packageASourceCodeInstalled = packageA.GetInstalledFilePath("Package.wxs");
76
-
77
- // Source file should *not* be installed
78
- Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A payload should not be there on test start: {packageASourceCodeInstalled}");
79
-
80
- bundleC.Install();
81
-
82
- var cachedBundlePath = bundleC.VerifyRegisteredAndInPackageCache();
83
-
84
- // Source file should be installed
85
- Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A payload installed at: ", packageASourceCodeInstalled));
86
-
87
- bundleC.Uninstall(cachedBundlePath);
88
-
89
- // Source file should *not* be installed
90
- Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Package A payload should have been removed by uninstall from: ", packageASourceCodeInstalled));
29
+ this.CanInstallAndUninstallSimpleBundle("PackageA", "BundleC");
30
+ }
31
92
- bundleC.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath);
32
+ [Fact]
33
+ public void CanInstallAndUninstallSimpleBundle_x86_wixba()
34
+ {
35
+ this.CanInstallAndUninstallSimpleBundle("PackageA", "BundleD");
36
}
37
38
[Fact]
39
public void CanInstallAndUninstallSimpleBundle_x64_wixstdba()
40
{
98
- var packageA_x64 = this.CreatePackageInstaller("PackageA_x64");
99
-
100
- var bundleA_x64 = this.CreateBundleInstaller("BundleA_x64");
101
-
102
- var packageASourceCodeInstalled = packageA_x64.GetInstalledFilePath("Package.wxs");
103
-
104
- // Source file should *not* be installed
105
- Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A x64 payload should not be there on test start: {packageASourceCodeInstalled}");
106
-
107
- bundleA_x64.Install();
108
-
109
- var cachedBundlePath = bundleA_x64.VerifyRegisteredAndInPackageCache();
110
-
111
- // Source file should be installed
112
- Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A x64 payload installed at: ", packageASourceCodeInstalled));
113
-
114
- bundleA_x64.Uninstall(cachedBundlePath);
115
-
116
- // Source file should *not* be installed
117
- Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Package A x64 payload should have been removed by uninstall from: ", packageASourceCodeInstalled));
118
-
119
- bundleA_x64.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath);
41
+ this.CanInstallAndUninstallSimpleBundle("PackageA_x64", "BundleA_x64");
42
}
43
44
[Fact]
45
public void CanInstallAndUninstallSimpleBundle_x64_testba()
46
{
125
- var packageA_x64 = this.CreatePackageInstaller("PackageA_x64");
126
-
127
- var bundleB_x64 = this.CreateBundleInstaller("BundleB_x64");
128
-
129
- var packageASourceCodeInstalled = packageA_x64.GetInstalledFilePath("Package.wxs");
130
-
131
- // Source file should *not* be installed
132
- Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A x64 payload should not be there on test start: {packageASourceCodeInstalled}");
133
-
134
- bundleB_x64.Install();
135
-
136
- var cachedBundlePath = bundleB_x64.VerifyRegisteredAndInPackageCache();
137
-
138
- // Source file should be installed
139
- Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A x64 payload installed at: ", packageASourceCodeInstalled));
140
-
141
- bundleB_x64.Uninstall(cachedBundlePath);
142
-
143
- // Source file should *not* be installed
144
- Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Package A x64 payload should have been removed by uninstall from: ", packageASourceCodeInstalled));
145
-
146
- bundleB_x64.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath);
47
+ this.CanInstallAndUninstallSimpleBundle("PackageA_x64", "BundleB_x64");
48
}
49
50
[Fact]
51
public void CanInstallAndUninstallSimpleBundle_x64_dnctestba()
52
{
152
- var packageA_x64 = this.CreatePackageInstaller("PackageA_x64");
53
+ this.CanInstallAndUninstallSimpleBundle("PackageA_x64", "BundleC_x64");
54
+ }
55
+
56
+ [Fact]
57
+ public void CanInstallAndUninstallSimpleBundle_x64_dncwixba()
58
+ {
59
+ this.CanInstallAndUninstallSimpleBundle("PackageA_x64", "BundleD_x64");
60
+ }
61
+
62
+ private void CanInstallAndUninstallSimpleBundle(string packageName, string bundleName)
63
+ {
64
+ var package = this.CreatePackageInstaller(packageName);
65
154
- var bundleC_x64 = this.CreateBundleInstaller("BundleC_x64");
66
+ var bundle = this.CreateBundleInstaller(bundleName);
67
156
- var packageASourceCodeInstalled = packageA_x64.GetInstalledFilePath("Package.wxs");
68
+ var packageSourceCodeInstalled = package.GetInstalledFilePath("Package.wxs");
69
70
// Source file should *not* be installed
159
- Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A x64 payload should not be there on test start: {packageASourceCodeInstalled}");
71
+ Assert.False(File.Exists(packageSourceCodeInstalled), $"{packageName} payload should not be there on test start: {packageSourceCodeInstalled}");
72
161
- bundleC_x64.Install();
73
+ bundle.Install();
74
163
- var cachedBundlePath = bundleC_x64.VerifyRegisteredAndInPackageCache();
75
+ var cachedBundlePath = bundle.VerifyRegisteredAndInPackageCache();
76
77
// Source file should be installed
166
- Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A x64 payload installed at: ", packageASourceCodeInstalled));
78
+ Assert.True(File.Exists(packageSourceCodeInstalled), $"Should have found {packageName} payload installed at: {packageSourceCodeInstalled}");
79
168
- bundleC_x64.Uninstall(cachedBundlePath);
80
+ bundle.Uninstall(cachedBundlePath);
81
82
// Source file should *not* be installed
171
- Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Package A x64 payload should have been removed by uninstall from: ", packageASourceCodeInstalled));
83
+ Assert.False(File.Exists(packageSourceCodeInstalled), $"{packageName} payload should have been removed by uninstall from: {packageSourceCodeInstalled}");
84
173
- bundleC_x64.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath);
85
+ bundle.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath);
86
}
87
}
88
}