diff options
Diffstat (limited to 'src/ext/Bal/test')
-rw-r--r-- | src/ext/Bal/test/WixToolsetTest.Bal/BalExtensionFixture.cs | 29 | ||||
-rw-r--r-- | src/ext/Bal/test/WixToolsetTest.Bal/TestData/Dncba/Bundle.wxs | 13 |
2 files changed, 42 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()) |
diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/Dncba/Bundle.wxs b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/Dncba/Bundle.wxs new file mode 100644 index 00000000..5b25da8c --- /dev/null +++ b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/Dncba/Bundle.wxs | |||
@@ -0,0 +1,13 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" | ||
3 | xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | ||
4 | <Bundle Name="WixStdBa" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="75D5D534-E177-4689-AAE9-CAC1C39002C2"> | ||
5 | <BootstrapperApplication> | ||
6 | <bal:WixDotNetCoreBootstrapperApplicationHost SelfContainedDeployment="yes" /> | ||
7 | <Payload SourceFile="runtimes\win-x86\native\wixnative.exe" /> | ||
8 | </BootstrapperApplication> | ||
9 | <Chain> | ||
10 | <ExePackage Permanent="yes" DetectCondition="none" SourceFile="runtimes\win-x86\native\wixnative.exe" /> | ||
11 | </Chain> | ||
12 | </Bundle> | ||
13 | </Wix> | ||