diff options
Diffstat (limited to 'src/test/burn/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs')
-rw-r--r-- | src/test/burn/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs | 150 |
1 files changed, 31 insertions, 119 deletions
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs index 5df86fff..f8361d90 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/BasicFunctionalityTests.cs | |||
@@ -14,163 +14,75 @@ namespace WixToolsetTest.BurnE2E | |||
14 | [Fact] | 14 | [Fact] |
15 | public void CanInstallAndUninstallSimpleBundle_x86_wixstdba() | 15 | public void CanInstallAndUninstallSimpleBundle_x86_wixstdba() |
16 | { | 16 | { |
17 | var packageA = this.CreatePackageInstaller("PackageA"); | 17 | this.CanInstallAndUninstallSimpleBundle("PackageA", "BundleA"); |
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 | } | 18 | } |
40 | 19 | ||
41 | [Fact] | 20 | [Fact] |
42 | public void CanInstallAndUninstallSimpleBundle_x86_testba() | 21 | public void CanInstallAndUninstallSimpleBundle_x86_testba() |
43 | { | 22 | { |
44 | var packageA = this.CreatePackageInstaller("PackageA"); | 23 | this.CanInstallAndUninstallSimpleBundle("PackageA", "BundleB"); |
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 | } | 24 | } |
67 | 25 | ||
68 | [Fact] | 26 | [Fact] |
69 | public void CanInstallAndUninstallSimpleBundle_x86_dnctestba() | 27 | public void CanInstallAndUninstallSimpleBundle_x86_dnctestba() |
70 | { | 28 | { |
71 | var packageA = this.CreatePackageInstaller("PackageA"); | 29 | this.CanInstallAndUninstallSimpleBundle("PackageA", "BundleC"); |
72 | 30 | } | |
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 | 31 | ||
92 | bundleC.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); | 32 | [Fact] |
33 | public void CanInstallAndUninstallSimpleBundle_x86_wixba() | ||
34 | { | ||
35 | this.CanInstallAndUninstallSimpleBundle("PackageA", "BundleD"); | ||
93 | } | 36 | } |
94 | 37 | ||
95 | [Fact] | 38 | [Fact] |
96 | public void CanInstallAndUninstallSimpleBundle_x64_wixstdba() | 39 | public void CanInstallAndUninstallSimpleBundle_x64_wixstdba() |
97 | { | 40 | { |
98 | var packageA_x64 = this.CreatePackageInstaller("PackageA_x64"); | 41 | this.CanInstallAndUninstallSimpleBundle("PackageA_x64", "BundleA_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 | } | 42 | } |
121 | 43 | ||
122 | [Fact] | 44 | [Fact] |
123 | public void CanInstallAndUninstallSimpleBundle_x64_testba() | 45 | public void CanInstallAndUninstallSimpleBundle_x64_testba() |
124 | { | 46 | { |
125 | var packageA_x64 = this.CreatePackageInstaller("PackageA_x64"); | 47 | this.CanInstallAndUninstallSimpleBundle("PackageA_x64", "BundleB_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 | } | 48 | } |
148 | 49 | ||
149 | [Fact] | 50 | [Fact] |
150 | public void CanInstallAndUninstallSimpleBundle_x64_dnctestba() | 51 | public void CanInstallAndUninstallSimpleBundle_x64_dnctestba() |
151 | { | 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); | ||
153 | 65 | ||
154 | var bundleC_x64 = this.CreateBundleInstaller("BundleC_x64"); | 66 | var bundle = this.CreateBundleInstaller(bundleName); |
155 | 67 | ||
156 | var packageASourceCodeInstalled = packageA_x64.GetInstalledFilePath("Package.wxs"); | 68 | var packageSourceCodeInstalled = package.GetInstalledFilePath("Package.wxs"); |
157 | 69 | ||
158 | // Source file should *not* be installed | 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}"); |
160 | 72 | ||
161 | bundleC_x64.Install(); | 73 | bundle.Install(); |
162 | 74 | ||
163 | var cachedBundlePath = bundleC_x64.VerifyRegisteredAndInPackageCache(); | 75 | var cachedBundlePath = bundle.VerifyRegisteredAndInPackageCache(); |
164 | 76 | ||
165 | // Source file should be installed | 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}"); |
167 | 79 | ||
168 | bundleC_x64.Uninstall(cachedBundlePath); | 80 | bundle.Uninstall(cachedBundlePath); |
169 | 81 | ||
170 | // Source file should *not* be installed | 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}"); |
172 | 84 | ||
173 | bundleC_x64.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); | 85 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); |
174 | } | 86 | } |
175 | } | 87 | } |
176 | } | 88 | } |