diff options
Diffstat (limited to 'src/test/burn/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs')
-rw-r--r-- | src/test/burn/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs | 176 |
1 files changed, 176 insertions, 0 deletions
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs new file mode 100644 index 00000000..5df86fff --- /dev/null +++ b/src/test/burn/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs | |||
@@ -0,0 +1,176 @@ | |||
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 | |||
3 | namespace WixToolsetTest.BurnE2E | ||
4 | { | ||
5 | using System; | ||
6 | using System.IO; | ||
7 | using Xunit; | ||
8 | using Xunit.Abstractions; | ||
9 | |||
10 | public class BasicFunctionalityTests : BurnE2ETests | ||
11 | { | ||
12 | public BasicFunctionalityTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } | ||
13 | |||
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); | ||
39 | } | ||
40 | |||
41 | [Fact] | ||
42 | public void CanInstallAndUninstallSimpleBundle_x86_testba() | ||
43 | { | ||
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); | ||
66 | } | ||
67 | |||
68 | [Fact] | ||
69 | public void CanInstallAndUninstallSimpleBundle_x86_dnctestba() | ||
70 | { | ||
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)); | ||
91 | |||
92 | bundleC.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); | ||
93 | } | ||
94 | |||
95 | [Fact] | ||
96 | public void CanInstallAndUninstallSimpleBundle_x64_wixstdba() | ||
97 | { | ||
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); | ||
120 | } | ||
121 | |||
122 | [Fact] | ||
123 | public void CanInstallAndUninstallSimpleBundle_x64_testba() | ||
124 | { | ||
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); | ||
147 | } | ||
148 | |||
149 | [Fact] | ||
150 | public void CanInstallAndUninstallSimpleBundle_x64_dnctestba() | ||
151 | { | ||
152 | var packageA_x64 = this.CreatePackageInstaller("PackageA_x64"); | ||
153 | |||
154 | var bundleC_x64 = this.CreateBundleInstaller("BundleC_x64"); | ||
155 | |||
156 | var packageASourceCodeInstalled = packageA_x64.GetInstalledFilePath("Package.wxs"); | ||
157 | |||
158 | // Source file should *not* be installed | ||
159 | Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A x64 payload should not be there on test start: {packageASourceCodeInstalled}"); | ||
160 | |||
161 | bundleC_x64.Install(); | ||
162 | |||
163 | var cachedBundlePath = bundleC_x64.VerifyRegisteredAndInPackageCache(); | ||
164 | |||
165 | // Source file should be installed | ||
166 | Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A x64 payload installed at: ", packageASourceCodeInstalled)); | ||
167 | |||
168 | bundleC_x64.Uninstall(cachedBundlePath); | ||
169 | |||
170 | // 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)); | ||
172 | |||
173 | bundleC_x64.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); | ||
174 | } | ||
175 | } | ||
176 | } | ||