summaryrefslogtreecommitdiff
path: root/src/test/burn/WixToolsetTest.BurnE2E/BundlePackageTests.cs
diff options
context:
space:
mode:
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}