summaryrefslogtreecommitdiff
path: root/src/test/burn/WixToolsetTest.BurnE2E/BundlePackageTests.cs
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2022-03-30 17:08:40 -0500
committerSean Hall <r.sean.hall@gmail.com>2022-04-01 22:06:11 -0500
commit386a3578413ba16b3c0615d47870ee44a0e461f6 (patch)
tree1dfcea9e5080f1f15cc880aba1541a962426c58b /src/test/burn/WixToolsetTest.BurnE2E/BundlePackageTests.cs
parentd97c0d1685ef4c3840776327e76ce25d4dbdbeb1 (diff)
downloadwix-386a3578413ba16b3c0615d47870ee44a0e461f6.tar.gz
wix-386a3578413ba16b3c0615d47870ee44a0e461f6.tar.bz2
wix-386a3578413ba16b3c0615d47870ee44a0e461f6.zip
Implement BundlePackage.
3693
Diffstat (limited to 'src/test/burn/WixToolsetTest.BurnE2E/BundlePackageTests.cs')
-rw-r--r--src/test/burn/WixToolsetTest.BurnE2E/BundlePackageTests.cs51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/BundlePackageTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/BundlePackageTests.cs
new file mode 100644
index 00000000..2e95aedb
--- /dev/null
+++ b/src/test/burn/WixToolsetTest.BurnE2E/BundlePackageTests.cs
@@ -0,0 +1,51 @@
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.BurnE2E
4{
5 using System.IO;
6 using Xunit;
7 using Xunit.Abstractions;
8
9 public class BundlePackageTests : BurnE2ETests
10 {
11 public BundlePackageTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { }
12
13 [Fact]
14 public void CanInstallAndUninstallBundlePackages()
15 {
16 var packageA = this.CreatePackageInstaller(@"..\BasicFunctionalityTests\PackageA");
17 var packageA_x64 = this.CreatePackageInstaller(@"..\BasicFunctionalityTests\PackageA_x64");
18 var bundleA = this.CreateBundleInstaller(@"..\BasicFunctionalityTests\BundleA");
19 var bundleB_x64 = this.CreateBundleInstaller(@"..\BasicFunctionalityTests\BundleB_x64");
20 var multipleBundlePackagesBundle = this.CreateBundleInstaller(@"MultipleBundlePackagesBundle");
21
22 var packageA32SourceCodeFilePath = packageA.GetInstalledFilePath("Package.wxs");
23 var packageA64SourceCodeFilePath = packageA_x64.GetInstalledFilePath("Package.wxs");
24
25 // Source file should *not* be installed
26 Assert.False(File.Exists(packageA32SourceCodeFilePath), $"PackageA payload should not be there on test start: {packageA32SourceCodeFilePath}");
27 Assert.False(File.Exists(packageA64SourceCodeFilePath), $"PackageA_x64 payload should not be there on test start: {packageA64SourceCodeFilePath}");
28
29 multipleBundlePackagesBundle.Install();
30 multipleBundlePackagesBundle.VerifyRegisteredAndInPackageCache();
31
32 bundleA.VerifyRegisteredAndInPackageCache();
33 bundleB_x64.VerifyRegisteredAndInPackageCache();
34
35 // Source file should be installed
36 Assert.True(File.Exists(packageA32SourceCodeFilePath), $"Should have found PackageA payload installed at: {packageA32SourceCodeFilePath}");
37 Assert.True(File.Exists(packageA64SourceCodeFilePath), $"Should have found PackageA_x64 payload installed at: {packageA64SourceCodeFilePath}");
38
39 multipleBundlePackagesBundle.Uninstall();
40 multipleBundlePackagesBundle.VerifyUnregisteredAndRemovedFromPackageCache();
41
42 bundleA.VerifyUnregisteredAndRemovedFromPackageCache();
43 bundleB_x64.VerifyUnregisteredAndRemovedFromPackageCache();
44
45 // Source file should *not* be installed
46 Assert.False(File.Exists(packageA32SourceCodeFilePath), $"PackageA payload should have been removed by uninstall from: {packageA32SourceCodeFilePath}");
47 Assert.False(File.Exists(packageA64SourceCodeFilePath), $"PackageA_x64 payload should have been removed by uninstall from: {packageA64SourceCodeFilePath}");
48
49 }
50 }
51}