aboutsummaryrefslogtreecommitdiff
path: root/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/BalExtensionFixture.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/BalExtensionFixture.cs')
-rw-r--r--src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/BalExtensionFixture.cs49
1 files changed, 25 insertions, 24 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();