diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2023-01-15 20:59:56 -0600 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2023-01-15 22:03:31 -0600 |
commit | ecbaffc08239e061a7dbaa92ff3c72acd53a0bae (patch) | |
tree | f6bf6660fc35b82085388ed489f4160c71ae68e1 /src/ext/Bal/test/WixToolsetTest.Bal/BalExtensionFixture.cs | |
parent | 32024b526d129534b017d4e932f08e6a6f015102 (diff) | |
download | wix-ecbaffc08239e061a7dbaa92ff3c72acd53a0bae.tar.gz wix-ecbaffc08239e061a7dbaa92ff3c72acd53a0bae.tar.bz2 wix-ecbaffc08239e061a7dbaa92ff3c72acd53a0bae.zip |
Write an error when the .NET Core BA is missing the BAFactoryAssembly.
7166
Diffstat (limited to 'src/ext/Bal/test/WixToolsetTest.Bal/BalExtensionFixture.cs')
-rw-r--r-- | src/ext/Bal/test/WixToolsetTest.Bal/BalExtensionFixture.cs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/BalExtensionFixture.cs b/src/ext/Bal/test/WixToolsetTest.Bal/BalExtensionFixture.cs index 32ff42b5..57dbda9c 100644 --- a/src/ext/Bal/test/WixToolsetTest.Bal/BalExtensionFixture.cs +++ b/src/ext/Bal/test/WixToolsetTest.Bal/BalExtensionFixture.cs | |||
@@ -185,6 +185,35 @@ namespace WixToolsetTest.Bal | |||
185 | } | 185 | } |
186 | 186 | ||
187 | [Fact] | 187 | [Fact] |
188 | public void CannotBuildUsingDncbaMissingBAFactoryPayload() | ||
189 | { | ||
190 | using (var fs = new DisposableFileSystem()) | ||
191 | { | ||
192 | var baseFolder = fs.GetFolder(); | ||
193 | var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); | ||
194 | var bundleSourceFolder = TestData.Get(@"TestData\Dncba"); | ||
195 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
196 | |||
197 | var compileResult = WixRunner.Execute(new[] | ||
198 | { | ||
199 | "build", | ||
200 | Path.Combine(bundleSourceFolder, "Bundle.wxs"), | ||
201 | "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), | ||
202 | "-intermediateFolder", intermediateFolder, | ||
203 | "-o", bundleFile, | ||
204 | }); | ||
205 | WixAssert.CompareLineByLine(new[] | ||
206 | { | ||
207 | "The BA's entry point DLL must have bal:BAFactoryAssembly=\"yes\" when using the DotNetCoreBootstrapperApplicationHost.", | ||
208 | }, compileResult.Messages.Select(x => x.ToString()).ToArray()); | ||
209 | Assert.Equal(6818, compileResult.ExitCode); | ||
210 | |||
211 | Assert.False(File.Exists(bundleFile)); | ||
212 | Assert.False(File.Exists(Path.Combine(intermediateFolder, "test.exe"))); | ||
213 | } | ||
214 | } | ||
215 | |||
216 | [Fact] | ||
188 | public void CannotBuildUsingOverridableWrongCase() | 217 | public void CannotBuildUsingOverridableWrongCase() |
189 | { | 218 | { |
190 | using (var fs = new DisposableFileSystem()) | 219 | using (var fs = new DisposableFileSystem()) |