aboutsummaryrefslogtreecommitdiff
path: root/src/test/WixToolsetTest.CoreIntegration/BootstrapperApplicationFixture.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration/BootstrapperApplicationFixture.cs')
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/BootstrapperApplicationFixture.cs46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/BootstrapperApplicationFixture.cs b/src/test/WixToolsetTest.CoreIntegration/BootstrapperApplicationFixture.cs
new file mode 100644
index 00000000..9bdc9496
--- /dev/null
+++ b/src/test/WixToolsetTest.CoreIntegration/BootstrapperApplicationFixture.cs
@@ -0,0 +1,46 @@
1// 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
3namespace WixToolsetTest.CoreIntegration
4{
5 using System.IO;
6 using System.Linq;
7 using WixBuildTools.TestSupport;
8 using WixToolset.Core.TestPackage;
9 using WixToolset.Data;
10 using WixToolset.Data.Symbols;
11 using Xunit;
12
13 public class BootstrapperApplicationFixture
14 {
15 [Fact]
16 public void CanSetBootstrapperApplicationDllDpiAwareness()
17 {
18 var folder = TestData.Get(@"TestData\BootstrapperApplication");
19
20 using (var fs = new DisposableFileSystem())
21 {
22 var baseFolder = fs.GetFolder();
23 var intermediateFolder = Path.Combine(baseFolder, "obj");
24 var wixlibPath = Path.Combine(intermediateFolder, @"test.wixlib");
25
26 var result = WixRunner.Execute(new[]
27 {
28 "build",
29 Path.Combine(folder, "DpiAwareness.wxs"),
30 "-intermediateFolder", intermediateFolder,
31 "-o", wixlibPath,
32 });
33
34 result.AssertSuccess();
35
36 var intermediate = Intermediate.Load(wixlibPath);
37 var allSymbols = intermediate.Sections.SelectMany(s => s.Symbols);
38 var baDllSymbol = allSymbols.OfType<WixBootstrapperApplicationDllSymbol>()
39 .SingleOrDefault();
40 Assert.NotNull(baDllSymbol);
41
42 Assert.Equal(WixBootstrapperApplicationDpiAwarenessType.GdiScaled, baDllSymbol.DpiAwareness);
43 }
44 }
45 }
46}