diff options
author | Bob Arnson <bob@firegiant.com> | 2025-02-14 22:29:39 -0500 |
---|---|---|
committer | Bob Arnson <github@bobs.org> | 2025-03-03 14:25:07 -0500 |
commit | ca6e44d496b0c589fdaabad69a00643f539c47cd (patch) | |
tree | edf84727cecfc03092a2851b465d97622c5048eb /src/ext/Bal/test | |
parent | ba7fd5837ea149b2e319cc577fad27ce1162a064 (diff) | |
download | wix-ca6e44d496b0c589fdaabad69a00643f539c47cd.tar.gz wix-ca6e44d496b0c589fdaabad69a00643f539c47cd.tar.bz2 wix-ca6e44d496b0c589fdaabad69a00643f539c47cd.zip |
Convert ext\ to MSTest and traversal projects.
- Move ext\ unit tests to MSTest.
- MSBuildify ext projects with MSTest execution.
- Fork test support projects for MSTest:
- WixInternal.TestSupport
- WixInternal.Core.TestPackage
Diffstat (limited to 'src/ext/Bal/test')
3 files changed, 77 insertions, 74 deletions
diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/BalExtensionFixture.cs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/BalExtensionFixture.cs index 2e21ef90..6e24ad72 100644 --- a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/BalExtensionFixture.cs +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/BalExtensionFixture.cs | |||
@@ -6,13 +6,14 @@ namespace WixToolsetTest.BootstrapperApplications | |||
6 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
7 | using System.IO; | 7 | using System.IO; |
8 | using System.Linq; | 8 | using System.Linq; |
9 | using WixInternal.Core.TestPackage; | 9 | using Microsoft.VisualStudio.TestTools.UnitTesting; |
10 | using WixInternal.TestSupport; | 10 | using WixInternal.Core.MSTestPackage; |
11 | using Xunit; | 11 | using WixInternal.MSTestSupport; |
12 | 12 | ||
13 | [TestClass] | ||
13 | public class BalExtensionFixture | 14 | public class BalExtensionFixture |
14 | { | 15 | { |
15 | [Fact] | 16 | [TestMethod] |
16 | public void CanBuildUsingDisplayInternalUICondition() | 17 | public void CanBuildUsingDisplayInternalUICondition() |
17 | { | 18 | { |
18 | using (var fs = new DisposableFileSystem()) | 19 | using (var fs = new DisposableFileSystem()) |
@@ -35,7 +36,7 @@ namespace WixToolsetTest.BootstrapperApplications | |||
35 | }); | 36 | }); |
36 | compileResult.AssertSuccess(); | 37 | compileResult.AssertSuccess(); |
37 | 38 | ||
38 | Assert.True(File.Exists(bundleFile)); | 39 | Assert.IsTrue(File.Exists(bundleFile)); |
39 | 40 | ||
40 | var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); | 41 | var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); |
41 | extractResult.AssertSuccess(); | 42 | extractResult.AssertSuccess(); |
@@ -46,11 +47,11 @@ namespace WixToolsetTest.BootstrapperApplications | |||
46 | "<WixBalPackageInfo PackageId='test.msi' DisplayInternalUICondition='1' />", | 47 | "<WixBalPackageInfo PackageId='test.msi' DisplayInternalUICondition='1' />", |
47 | }, balPackageInfos); | 48 | }, balPackageInfos); |
48 | 49 | ||
49 | Assert.True(File.Exists(Path.Combine(baFolderPath, "thm.wxl"))); | 50 | Assert.IsTrue(File.Exists(Path.Combine(baFolderPath, "thm.wxl"))); |
50 | } | 51 | } |
51 | } | 52 | } |
52 | 53 | ||
53 | [Fact] | 54 | [TestMethod] |
54 | public void CanBuildUsingBootstrapperApplicationId() | 55 | public void CanBuildUsingBootstrapperApplicationId() |
55 | { | 56 | { |
56 | using (var fs = new DisposableFileSystem()) | 57 | using (var fs = new DisposableFileSystem()) |
@@ -73,7 +74,7 @@ namespace WixToolsetTest.BootstrapperApplications | |||
73 | }); | 74 | }); |
74 | compileResult.AssertSuccess(); | 75 | compileResult.AssertSuccess(); |
75 | 76 | ||
76 | Assert.True(File.Exists(bundleFile)); | 77 | Assert.IsTrue(File.Exists(bundleFile)); |
77 | 78 | ||
78 | var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); | 79 | var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); |
79 | extractResult.AssertSuccess(); | 80 | extractResult.AssertSuccess(); |
@@ -91,7 +92,7 @@ namespace WixToolsetTest.BootstrapperApplications | |||
91 | } | 92 | } |
92 | } | 93 | } |
93 | 94 | ||
94 | [Fact] | 95 | [TestMethod] |
95 | public void CanBuildUsingOverridable() | 96 | public void CanBuildUsingOverridable() |
96 | { | 97 | { |
97 | using (var fs = new DisposableFileSystem()) | 98 | using (var fs = new DisposableFileSystem()) |
@@ -113,7 +114,7 @@ namespace WixToolsetTest.BootstrapperApplications | |||
113 | }); | 114 | }); |
114 | compileResult.AssertSuccess(); | 115 | compileResult.AssertSuccess(); |
115 | 116 | ||
116 | Assert.True(File.Exists(bundleFile)); | 117 | Assert.IsTrue(File.Exists(bundleFile)); |
117 | 118 | ||
118 | var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); | 119 | var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); |
119 | extractResult.AssertSuccess(); | 120 | extractResult.AssertSuccess(); |
@@ -132,7 +133,7 @@ namespace WixToolsetTest.BootstrapperApplications | |||
132 | } | 133 | } |
133 | } | 134 | } |
134 | 135 | ||
135 | [Fact] | 136 | [TestMethod] |
136 | public void CanBuildUsingWixStdBa() | 137 | public void CanBuildUsingWixStdBa() |
137 | { | 138 | { |
138 | using (var fs = new DisposableFileSystem()) | 139 | using (var fs = new DisposableFileSystem()) |
@@ -152,11 +153,11 @@ namespace WixToolsetTest.BootstrapperApplications | |||
152 | }); | 153 | }); |
153 | compileResult.AssertSuccess(); | 154 | compileResult.AssertSuccess(); |
154 | 155 | ||
155 | Assert.True(File.Exists(bundleFile)); | 156 | Assert.IsTrue(File.Exists(bundleFile)); |
156 | } | 157 | } |
157 | } | 158 | } |
158 | 159 | ||
159 | //[Fact] | 160 | // [TestMethod] |
160 | //public void CanBuildUsingMBAWithAlwaysInstallPrereqs() | 161 | //public void CanBuildUsingMBAWithAlwaysInstallPrereqs() |
161 | //{ | 162 | //{ |
162 | // using (var fs = new DisposableFileSystem()) | 163 | // using (var fs = new DisposableFileSystem()) |
@@ -179,7 +180,7 @@ namespace WixToolsetTest.BootstrapperApplications | |||
179 | 180 | ||
180 | // compileResult.AssertSuccess(); | 181 | // compileResult.AssertSuccess(); |
181 | 182 | ||
182 | // Assert.True(File.Exists(bundleFile)); | 183 | // Assert.IsTrue(File.Exists(bundleFile)); |
183 | 184 | ||
184 | // var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); | 185 | // var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); |
185 | // extractResult.AssertSuccess(); | 186 | // extractResult.AssertSuccess(); |
@@ -198,7 +199,7 @@ namespace WixToolsetTest.BootstrapperApplications | |||
198 | // } | 199 | // } |
199 | //} | 200 | //} |
200 | 201 | ||
201 | [Fact] | 202 | [TestMethod] |
202 | public void CannotBuildUsingMBAWithNoPrereqs() | 203 | public void CannotBuildUsingMBAWithNoPrereqs() |
203 | { | 204 | { |
204 | using (var fs = new DisposableFileSystem()) | 205 | using (var fs = new DisposableFileSystem()) |
@@ -223,14 +224,14 @@ namespace WixToolsetTest.BootstrapperApplications | |||
223 | { | 224 | { |
224 | "The WixManagedBootstrapperApplicationHost element has been deprecated.", | 225 | "The WixManagedBootstrapperApplicationHost element has been deprecated.", |
225 | }, compileResult.Messages.Select(m => m.ToString()).ToArray()); | 226 | }, compileResult.Messages.Select(m => m.ToString()).ToArray()); |
226 | Assert.Equal(1130, compileResult.ExitCode); | 227 | Assert.AreEqual(1130, compileResult.ExitCode); |
227 | 228 | ||
228 | Assert.False(File.Exists(bundleFile)); | 229 | Assert.IsFalse(File.Exists(bundleFile)); |
229 | Assert.False(File.Exists(Path.Combine(intermediateFolder, "test.exe"))); | 230 | Assert.IsFalse(File.Exists(Path.Combine(intermediateFolder, "test.exe"))); |
230 | } | 231 | } |
231 | } | 232 | } |
232 | 233 | ||
233 | [Fact] | 234 | [TestMethod] |
234 | public void CannotBuildUsingDncbaMissingBAFactoryPayload() | 235 | public void CannotBuildUsingDncbaMissingBAFactoryPayload() |
235 | { | 236 | { |
236 | using (var fs = new DisposableFileSystem()) | 237 | using (var fs = new DisposableFileSystem()) |
@@ -254,14 +255,14 @@ namespace WixToolsetTest.BootstrapperApplications | |||
254 | "The WixDotNetCoreBootstrapperApplicationHost element has been deprecated.", | 255 | "The WixDotNetCoreBootstrapperApplicationHost element has been deprecated.", |
255 | "The BootstrapperApplication element's Name or SourceFile attribute was not found; one of these is required." | 256 | "The BootstrapperApplication element's Name or SourceFile attribute was not found; one of these is required." |
256 | }, compileResult.Messages.Select(x => x.ToString()).ToArray()); | 257 | }, compileResult.Messages.Select(x => x.ToString()).ToArray()); |
257 | Assert.Equal(44, compileResult.ExitCode); | 258 | Assert.AreEqual(44, compileResult.ExitCode); |
258 | 259 | ||
259 | Assert.False(File.Exists(bundleFile)); | 260 | Assert.IsFalse(File.Exists(bundleFile)); |
260 | Assert.False(File.Exists(Path.Combine(intermediateFolder, "test.exe"))); | 261 | Assert.IsFalse(File.Exists(Path.Combine(intermediateFolder, "test.exe"))); |
261 | } | 262 | } |
262 | } | 263 | } |
263 | 264 | ||
264 | [Fact] | 265 | [TestMethod] |
265 | public void CannotBuildUsingOverridableWrongCase() | 266 | public void CannotBuildUsingOverridableWrongCase() |
266 | { | 267 | { |
267 | using (var fs = new DisposableFileSystem()) | 268 | using (var fs = new DisposableFileSystem()) |
@@ -284,7 +285,7 @@ namespace WixToolsetTest.BootstrapperApplications | |||
284 | "-o", bundleFile, | 285 | "-o", bundleFile, |
285 | }); | 286 | }); |
286 | 287 | ||
287 | Assert.InRange(result.ExitCode, 2, Int32.MaxValue); | 288 | Assert.IsTrue(result.ExitCode >= 2 && result.ExitCode <= Int32.MaxValue); |
288 | 289 | ||
289 | var messages = result.Messages.Select(m => m.ToString()).ToList(); | 290 | var messages = result.Messages.Select(m => m.ToString()).ToList(); |
290 | messages.Sort(); | 291 | messages.Sort(); |
diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/InternalUIBAFixture.cs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/InternalUIBAFixture.cs index 58d5d551..72e31540 100644 --- a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/InternalUIBAFixture.cs +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/InternalUIBAFixture.cs | |||
@@ -5,13 +5,14 @@ namespace WixToolsetTest.BootstrapperApplications | |||
5 | using System.IO; | 5 | using System.IO; |
6 | using System.Linq; | 6 | using System.Linq; |
7 | using System.Xml; | 7 | using System.Xml; |
8 | using WixInternal.Core.TestPackage; | 8 | using Microsoft.VisualStudio.TestTools.UnitTesting; |
9 | using WixInternal.TestSupport; | 9 | using WixInternal.Core.MSTestPackage; |
10 | using Xunit; | 10 | using WixInternal.MSTestSupport; |
11 | 11 | ||
12 | [TestClass] | ||
12 | public class InternalUIBAFixture | 13 | public class InternalUIBAFixture |
13 | { | 14 | { |
14 | [Fact] | 15 | [TestMethod] |
15 | public void CanBuildUsingWixIuiBa() | 16 | public void CanBuildUsingWixIuiBa() |
16 | { | 17 | { |
17 | using (var fs = new DisposableFileSystem()) | 18 | using (var fs = new DisposableFileSystem()) |
@@ -34,7 +35,7 @@ namespace WixToolsetTest.BootstrapperApplications | |||
34 | }); | 35 | }); |
35 | compileResult.AssertSuccess(); | 36 | compileResult.AssertSuccess(); |
36 | 37 | ||
37 | Assert.True(File.Exists(bundleFile)); | 38 | Assert.IsTrue(File.Exists(bundleFile)); |
38 | 39 | ||
39 | var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); | 40 | var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); |
40 | extractResult.AssertSuccess(); | 41 | extractResult.AssertSuccess(); |
@@ -45,12 +46,12 @@ namespace WixToolsetTest.BootstrapperApplications | |||
45 | "<WixBalPackageInfo PackageId='test.msi' PrimaryPackageType='default' />", | 46 | "<WixBalPackageInfo PackageId='test.msi' PrimaryPackageType='default' />", |
46 | }, balPackageInfos); | 47 | }, balPackageInfos); |
47 | 48 | ||
48 | Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.thm"))); | 49 | Assert.IsTrue(File.Exists(Path.Combine(baFolderPath, "wixpreq.thm"))); |
49 | Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.wxl"))); | 50 | Assert.IsTrue(File.Exists(Path.Combine(baFolderPath, "wixpreq.wxl"))); |
50 | } | 51 | } |
51 | } | 52 | } |
52 | 53 | ||
53 | [Fact] | 54 | [TestMethod] |
54 | public void CanBuildUsingWixIuiBaWithUrlPrereqPackage() | 55 | public void CanBuildUsingWixIuiBaWithUrlPrereqPackage() |
55 | { | 56 | { |
56 | using (var fs = new DisposableFileSystem()) | 57 | using (var fs = new DisposableFileSystem()) |
@@ -73,7 +74,7 @@ namespace WixToolsetTest.BootstrapperApplications | |||
73 | }); | 74 | }); |
74 | compileResult.AssertSuccess(); | 75 | compileResult.AssertSuccess(); |
75 | 76 | ||
76 | Assert.True(File.Exists(bundleFile)); | 77 | Assert.IsTrue(File.Exists(bundleFile)); |
77 | 78 | ||
78 | var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); | 79 | var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); |
79 | extractResult.AssertSuccess(); | 80 | extractResult.AssertSuccess(); |
@@ -90,12 +91,12 @@ namespace WixToolsetTest.BootstrapperApplications | |||
90 | "<WixPrereqInformation PackageId='wixnative.exe' LicenseUrl='https://www.mysite.com/prereqterms' />", | 91 | "<WixPrereqInformation PackageId='wixnative.exe' LicenseUrl='https://www.mysite.com/prereqterms' />", |
91 | }, mbaPrereqInfos); | 92 | }, mbaPrereqInfos); |
92 | 93 | ||
93 | Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.thm"))); | 94 | Assert.IsTrue(File.Exists(Path.Combine(baFolderPath, "wixpreq.thm"))); |
94 | Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.wxl"))); | 95 | Assert.IsTrue(File.Exists(Path.Combine(baFolderPath, "wixpreq.wxl"))); |
95 | } | 96 | } |
96 | } | 97 | } |
97 | 98 | ||
98 | [Fact] | 99 | [TestMethod] |
99 | public void CanBuildUsingWixIuiBaWithImplicitPrimaryPackage() | 100 | public void CanBuildUsingWixIuiBaWithImplicitPrimaryPackage() |
100 | { | 101 | { |
101 | using (var fs = new DisposableFileSystem()) | 102 | using (var fs = new DisposableFileSystem()) |
@@ -118,7 +119,7 @@ namespace WixToolsetTest.BootstrapperApplications | |||
118 | }); | 119 | }); |
119 | compileResult.AssertSuccess(); | 120 | compileResult.AssertSuccess(); |
120 | 121 | ||
121 | Assert.True(File.Exists(bundleFile)); | 122 | Assert.IsTrue(File.Exists(bundleFile)); |
122 | 123 | ||
123 | var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); | 124 | var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); |
124 | extractResult.AssertSuccess(); | 125 | extractResult.AssertSuccess(); |
@@ -135,12 +136,12 @@ namespace WixToolsetTest.BootstrapperApplications | |||
135 | "<WixPrereqInformation PackageId='wixnative.exe' />", | 136 | "<WixPrereqInformation PackageId='wixnative.exe' />", |
136 | }, mbaPrereqInfos); | 137 | }, mbaPrereqInfos); |
137 | 138 | ||
138 | Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.thm"))); | 139 | Assert.IsTrue(File.Exists(Path.Combine(baFolderPath, "wixpreq.thm"))); |
139 | Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.wxl"))); | 140 | Assert.IsTrue(File.Exists(Path.Combine(baFolderPath, "wixpreq.wxl"))); |
140 | } | 141 | } |
141 | } | 142 | } |
142 | 143 | ||
143 | [Fact] | 144 | [TestMethod] |
144 | public void CanBuildUsingWixIuiBaWithWarnings() | 145 | public void CanBuildUsingWixIuiBaWithWarnings() |
145 | { | 146 | { |
146 | using (var fs = new DisposableFileSystem()) | 147 | using (var fs = new DisposableFileSystem()) |
@@ -172,7 +173,7 @@ namespace WixToolsetTest.BootstrapperApplications | |||
172 | 173 | ||
173 | compileResult.AssertSuccess(); | 174 | compileResult.AssertSuccess(); |
174 | 175 | ||
175 | Assert.True(File.Exists(bundleFile)); | 176 | Assert.IsTrue(File.Exists(bundleFile)); |
176 | 177 | ||
177 | var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); | 178 | var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); |
178 | extractResult.AssertSuccess(); | 179 | extractResult.AssertSuccess(); |
@@ -189,12 +190,12 @@ namespace WixToolsetTest.BootstrapperApplications | |||
189 | "<WixPrereqInformation PackageId='wixnative.exe' />", | 190 | "<WixPrereqInformation PackageId='wixnative.exe' />", |
190 | }, mbaPrereqInfos); | 191 | }, mbaPrereqInfos); |
191 | 192 | ||
192 | Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.thm"))); | 193 | Assert.IsTrue(File.Exists(Path.Combine(baFolderPath, "wixpreq.thm"))); |
193 | Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.wxl"))); | 194 | Assert.IsTrue(File.Exists(Path.Combine(baFolderPath, "wixpreq.wxl"))); |
194 | } | 195 | } |
195 | } | 196 | } |
196 | 197 | ||
197 | [Fact] | 198 | [TestMethod] |
198 | public void CanBuildUsingWixIuiBaAndForcedCachePrimaryPackage() | 199 | public void CanBuildUsingWixIuiBaAndForcedCachePrimaryPackage() |
199 | { | 200 | { |
200 | using (var fs = new DisposableFileSystem()) | 201 | using (var fs = new DisposableFileSystem()) |
@@ -218,7 +219,7 @@ namespace WixToolsetTest.BootstrapperApplications | |||
218 | 219 | ||
219 | compileResult.AssertSuccess(); | 220 | compileResult.AssertSuccess(); |
220 | 221 | ||
221 | Assert.True(File.Exists(bundleFile)); | 222 | Assert.IsTrue(File.Exists(bundleFile)); |
222 | 223 | ||
223 | var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); | 224 | var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); |
224 | extractResult.AssertSuccess(); | 225 | extractResult.AssertSuccess(); |
@@ -239,8 +240,8 @@ namespace WixToolsetTest.BootstrapperApplications | |||
239 | "<WixPrereqInformation PackageId='wixnative.exe' />", | 240 | "<WixPrereqInformation PackageId='wixnative.exe' />", |
240 | }, mbaPrereqInfos); | 241 | }, mbaPrereqInfos); |
241 | 242 | ||
242 | Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.thm"))); | 243 | Assert.IsTrue(File.Exists(Path.Combine(baFolderPath, "wixpreq.thm"))); |
243 | Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.wxl"))); | 244 | Assert.IsTrue(File.Exists(Path.Combine(baFolderPath, "wixpreq.wxl"))); |
244 | } | 245 | } |
245 | 246 | ||
246 | static void AssertCacheType(XmlNode node) | 247 | static void AssertCacheType(XmlNode node) |
@@ -251,16 +252,16 @@ namespace WixToolsetTest.BootstrapperApplications | |||
251 | 252 | ||
252 | if (package == "test.msi") | 253 | if (package == "test.msi") |
253 | { | 254 | { |
254 | Assert.Equal("force", cache); | 255 | Assert.AreEqual("force", cache); |
255 | } | 256 | } |
256 | else if (package == "wixnative.exe") | 257 | else if (package == "wixnative.exe") |
257 | { | 258 | { |
258 | Assert.Equal("keep", cache); | 259 | Assert.AreEqual("keep", cache); |
259 | } | 260 | } |
260 | } | 261 | } |
261 | } | 262 | } |
262 | 263 | ||
263 | [Fact] | 264 | [TestMethod] |
264 | public void CannotBuildUsingWixIuiBaWithAllPrereqPackages() | 265 | public void CannotBuildUsingWixIuiBaWithAllPrereqPackages() |
265 | { | 266 | { |
266 | using (var fs = new DisposableFileSystem()) | 267 | using (var fs = new DisposableFileSystem()) |
@@ -285,11 +286,11 @@ namespace WixToolsetTest.BootstrapperApplications | |||
285 | "When using WixInternalUIBootstrapperApplication, there must be one package with bal:PrimaryPackageType=\"default\".", | 286 | "When using WixInternalUIBootstrapperApplication, there must be one package with bal:PrimaryPackageType=\"default\".", |
286 | }, compileResult.Messages.Select(m => m.ToString()).ToArray()); | 287 | }, compileResult.Messages.Select(m => m.ToString()).ToArray()); |
287 | 288 | ||
288 | Assert.Equal(6808, compileResult.ExitCode); | 289 | Assert.AreEqual(6808, compileResult.ExitCode); |
289 | } | 290 | } |
290 | } | 291 | } |
291 | 292 | ||
292 | [Fact] | 293 | [TestMethod] |
293 | public void CannotBuildUsingWixIuiBaWithImplicitNonMsiPrimaryPackage() | 294 | public void CannotBuildUsingWixIuiBaWithImplicitNonMsiPrimaryPackage() |
294 | { | 295 | { |
295 | using (var fs = new DisposableFileSystem()) | 296 | using (var fs = new DisposableFileSystem()) |
@@ -314,11 +315,11 @@ namespace WixToolsetTest.BootstrapperApplications | |||
314 | "When using WixInternalUIBootstrapperApplication, packages must either be non-permanent and have the bal:PrimaryPackageType attribute, or be permanent and have the bal:PrereqPackage attribute set to 'yes'.", | 315 | "When using WixInternalUIBootstrapperApplication, packages must either be non-permanent and have the bal:PrimaryPackageType attribute, or be permanent and have the bal:PrereqPackage attribute set to 'yes'.", |
315 | }, compileResult.Messages.Select(m => m.ToString()).ToArray()); | 316 | }, compileResult.Messages.Select(m => m.ToString()).ToArray()); |
316 | 317 | ||
317 | Assert.Equal(6811, compileResult.ExitCode); | 318 | Assert.AreEqual(6811, compileResult.ExitCode); |
318 | } | 319 | } |
319 | } | 320 | } |
320 | 321 | ||
321 | [Fact] | 322 | [TestMethod] |
322 | public void CannotBuildUsingWixIuiBaWithImplicitPrimaryPackageEnableFeatureSelection() | 323 | public void CannotBuildUsingWixIuiBaWithImplicitPrimaryPackageEnableFeatureSelection() |
323 | { | 324 | { |
324 | using (var fs = new DisposableFileSystem()) | 325 | using (var fs = new DisposableFileSystem()) |
@@ -343,11 +344,11 @@ namespace WixToolsetTest.BootstrapperApplications | |||
343 | "When using WixInternalUIBootstrapperApplication, packages must either be non-permanent and have the bal:PrimaryPackageType attribute, or be permanent and have the bal:PrereqPackage attribute set to 'yes'.", | 344 | "When using WixInternalUIBootstrapperApplication, packages must either be non-permanent and have the bal:PrimaryPackageType attribute, or be permanent and have the bal:PrereqPackage attribute set to 'yes'.", |
344 | }, compileResult.Messages.Select(m => m.ToString()).ToArray()); | 345 | }, compileResult.Messages.Select(m => m.ToString()).ToArray()); |
345 | 346 | ||
346 | Assert.Equal(6811, compileResult.ExitCode); | 347 | Assert.AreEqual(6811, compileResult.ExitCode); |
347 | } | 348 | } |
348 | } | 349 | } |
349 | 350 | ||
350 | [Fact] | 351 | [TestMethod] |
351 | public void CannotBuildUsingWixIuiBaWithMultipleNonPermanentNonPrimaryPackages() | 352 | public void CannotBuildUsingWixIuiBaWithMultipleNonPermanentNonPrimaryPackages() |
352 | { | 353 | { |
353 | using (var fs = new DisposableFileSystem()) | 354 | using (var fs = new DisposableFileSystem()) |
@@ -373,11 +374,11 @@ namespace WixToolsetTest.BootstrapperApplications | |||
373 | "When using WixInternalUIBootstrapperApplication, packages must either be non-permanent and have the bal:PrimaryPackageType attribute, or be permanent and have the bal:PrereqPackage attribute set to 'yes'.", | 374 | "When using WixInternalUIBootstrapperApplication, packages must either be non-permanent and have the bal:PrimaryPackageType attribute, or be permanent and have the bal:PrereqPackage attribute set to 'yes'.", |
374 | }, compileResult.Messages.Select(m => m.ToString()).ToArray()); | 375 | }, compileResult.Messages.Select(m => m.ToString()).ToArray()); |
375 | 376 | ||
376 | Assert.Equal(6811, compileResult.ExitCode); | 377 | Assert.AreEqual(6811, compileResult.ExitCode); |
377 | } | 378 | } |
378 | } | 379 | } |
379 | 380 | ||
380 | [Fact] | 381 | [TestMethod] |
381 | public void CannotBuildUsingWixIuiBaWithMultiplePrimaryPackagesOfSameType() | 382 | public void CannotBuildUsingWixIuiBaWithMultiplePrimaryPackagesOfSameType() |
382 | { | 383 | { |
383 | using (var fs = new DisposableFileSystem()) | 384 | using (var fs = new DisposableFileSystem()) |
@@ -403,11 +404,11 @@ namespace WixToolsetTest.BootstrapperApplications | |||
403 | "The location of the package related to the previous error.", | 404 | "The location of the package related to the previous error.", |
404 | }, compileResult.Messages.Select(m => m.ToString()).ToArray()); | 405 | }, compileResult.Messages.Select(m => m.ToString()).ToArray()); |
405 | 406 | ||
406 | Assert.Equal(6810, compileResult.ExitCode); | 407 | Assert.AreEqual(6810, compileResult.ExitCode); |
407 | } | 408 | } |
408 | } | 409 | } |
409 | 410 | ||
410 | [Fact] | 411 | [TestMethod] |
411 | public void CannotBuildUsingWixIuiBaWithNoDefaultPrimaryPackage() | 412 | public void CannotBuildUsingWixIuiBaWithNoDefaultPrimaryPackage() |
412 | { | 413 | { |
413 | using (var fs = new DisposableFileSystem()) | 414 | using (var fs = new DisposableFileSystem()) |
@@ -432,11 +433,11 @@ namespace WixToolsetTest.BootstrapperApplications | |||
432 | "When using WixInternalUIBootstrapperApplication, there must be one package with bal:PrimaryPackageType=\"default\".", | 433 | "When using WixInternalUIBootstrapperApplication, there must be one package with bal:PrimaryPackageType=\"default\".", |
433 | }, compileResult.Messages.Select(m => m.ToString()).ToArray()); | 434 | }, compileResult.Messages.Select(m => m.ToString()).ToArray()); |
434 | 435 | ||
435 | Assert.Equal(6808, compileResult.ExitCode); | 436 | Assert.AreEqual(6808, compileResult.ExitCode); |
436 | } | 437 | } |
437 | } | 438 | } |
438 | 439 | ||
439 | [Fact] | 440 | [TestMethod] |
440 | public void CannotBuildUsingWixIuiBaWithNonMsiPrimaryPackage() | 441 | public void CannotBuildUsingWixIuiBaWithNonMsiPrimaryPackage() |
441 | { | 442 | { |
442 | using (var fs = new DisposableFileSystem()) | 443 | using (var fs = new DisposableFileSystem()) |
@@ -461,11 +462,11 @@ namespace WixToolsetTest.BootstrapperApplications | |||
461 | "When using WixInternalUIBootstrapperApplication, each primary package must be an MsiPackage.", | 462 | "When using WixInternalUIBootstrapperApplication, each primary package must be an MsiPackage.", |
462 | }, compileResult.Messages.Select(m => m.ToString()).ToArray()); | 463 | }, compileResult.Messages.Select(m => m.ToString()).ToArray()); |
463 | 464 | ||
464 | Assert.Equal(6814, compileResult.ExitCode); | 465 | Assert.AreEqual(6814, compileResult.ExitCode); |
465 | } | 466 | } |
466 | } | 467 | } |
467 | 468 | ||
468 | [Fact] | 469 | [TestMethod] |
469 | public void CannotBuildUsingWixIuiBaWithNonPermanentPrereqPackage() | 470 | public void CannotBuildUsingWixIuiBaWithNonPermanentPrereqPackage() |
470 | { | 471 | { |
471 | using (var fs = new DisposableFileSystem()) | 472 | using (var fs = new DisposableFileSystem()) |
@@ -490,11 +491,11 @@ namespace WixToolsetTest.BootstrapperApplications | |||
490 | "When using WixInternalUIBootstrapperApplication and bal:PrereqPackage is set to 'yes', the package must be permanent.", | 491 | "When using WixInternalUIBootstrapperApplication and bal:PrereqPackage is set to 'yes', the package must be permanent.", |
491 | }, compileResult.Messages.Select(m => m.ToString()).ToArray()); | 492 | }, compileResult.Messages.Select(m => m.ToString()).ToArray()); |
492 | 493 | ||
493 | Assert.Equal(6812, compileResult.ExitCode); | 494 | Assert.AreEqual(6812, compileResult.ExitCode); |
494 | } | 495 | } |
495 | } | 496 | } |
496 | 497 | ||
497 | [Fact] | 498 | [TestMethod] |
498 | public void CannotBuildUsingWixIuiBaWithPermanentPrimaryPackage() | 499 | public void CannotBuildUsingWixIuiBaWithPermanentPrimaryPackage() |
499 | { | 500 | { |
500 | using (var fs = new DisposableFileSystem()) | 501 | using (var fs = new DisposableFileSystem()) |
@@ -520,11 +521,11 @@ namespace WixToolsetTest.BootstrapperApplications | |||
520 | "When using WixInternalUIBootstrapperApplication, there must be one package with bal:PrimaryPackageType=\"default\".", | 521 | "When using WixInternalUIBootstrapperApplication, there must be one package with bal:PrimaryPackageType=\"default\".", |
521 | }, compileResult.Messages.Select(m => m.ToString()).ToArray()); | 522 | }, compileResult.Messages.Select(m => m.ToString()).ToArray()); |
522 | 523 | ||
523 | Assert.Equal(6808, compileResult.ExitCode); | 524 | Assert.AreEqual(6808, compileResult.ExitCode); |
524 | } | 525 | } |
525 | } | 526 | } |
526 | 527 | ||
527 | [Fact] | 528 | [TestMethod] |
528 | public void CannotBuildUsingWixIuiBaWithPrimaryPackageEnableFeatureSelection() | 529 | public void CannotBuildUsingWixIuiBaWithPrimaryPackageEnableFeatureSelection() |
529 | { | 530 | { |
530 | using (var fs = new DisposableFileSystem()) | 531 | using (var fs = new DisposableFileSystem()) |
@@ -550,11 +551,11 @@ namespace WixToolsetTest.BootstrapperApplications | |||
550 | "When using WixInternalUIBootstrapperApplication, there must be one package with bal:PrimaryPackageType=\"default\".", | 551 | "When using WixInternalUIBootstrapperApplication, there must be one package with bal:PrimaryPackageType=\"default\".", |
551 | }, compileResult.Messages.Select(m => m.ToString()).ToArray()); | 552 | }, compileResult.Messages.Select(m => m.ToString()).ToArray()); |
552 | 553 | ||
553 | Assert.Equal(6808, compileResult.ExitCode); | 554 | Assert.AreEqual(6808, compileResult.ExitCode); |
554 | } | 555 | } |
555 | } | 556 | } |
556 | 557 | ||
557 | [Fact] | 558 | [TestMethod] |
558 | public void CannotBuildUsingWixIuiBaWithPrimaryPrereqPackage() | 559 | public void CannotBuildUsingWixIuiBaWithPrimaryPrereqPackage() |
559 | { | 560 | { |
560 | using (var fs = new DisposableFileSystem()) | 561 | using (var fs = new DisposableFileSystem()) |
@@ -578,7 +579,7 @@ namespace WixToolsetTest.BootstrapperApplications | |||
578 | "The MsiPackage/@PrereqPackage attribute's value, 'yes', cannot be specified with attribute PrimaryPackageType present.", | 579 | "The MsiPackage/@PrereqPackage attribute's value, 'yes', cannot be specified with attribute PrimaryPackageType present.", |
579 | }, compileResult.Messages.Select(m => m.ToString()).ToArray()); | 580 | }, compileResult.Messages.Select(m => m.ToString()).ToArray()); |
580 | 581 | ||
581 | Assert.Equal(193, compileResult.ExitCode); | 582 | Assert.AreEqual(193, compileResult.ExitCode); |
582 | } | 583 | } |
583 | } | 584 | } |
584 | } | 585 | } |
diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/WixToolsetTest.BootstrapperApplications.csproj b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/WixToolsetTest.BootstrapperApplications.csproj index 64fc297c..6a9b5856 100644 --- a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/WixToolsetTest.BootstrapperApplications.csproj +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/WixToolsetTest.BootstrapperApplications.csproj | |||
@@ -1,10 +1,10 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 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. --> | 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 | 3 | ||
4 | <Project Sdk="Microsoft.NET.Sdk"> | 4 | <Project Sdk="MSTest.Sdk"> |
5 | <PropertyGroup> | 5 | <PropertyGroup> |
6 | <TargetFramework>net6.0</TargetFramework> | 6 | <TargetFramework>net6.0</TargetFramework> |
7 | <IsWixTestProject>true</IsWixTestProject> | 7 | <IsWixMSTestProject>true</IsWixMSTestProject> |
8 | </PropertyGroup> | 8 | </PropertyGroup> |
9 | 9 | ||
10 | <ItemGroup> | 10 | <ItemGroup> |
@@ -20,6 +20,7 @@ | |||
20 | </ItemGroup> | 20 | </ItemGroup> |
21 | 21 | ||
22 | <ItemGroup> | 22 | <ItemGroup> |
23 | <PackageReference Include="WixInternal.Core.TestPackage" /> | 23 | <PackageReference Include="WixInternal.MSTestSupport" /> |
24 | <PackageReference Include="WixInternal.Core.MSTestPackage" /> | ||
24 | </ItemGroup> | 25 | </ItemGroup> |
25 | </Project> | 26 | </Project> |