main
cs 49 lines 1.73 KB
Raw
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
3 #if TODO
4
5 namespace WixToolsetTest.CoreIntegration
6 {
7 using System.IO;
8 using System.Linq;
9 using WixInternal.TestSupport;
10 using WixInternal.Core.TestPackage;
11 using WixToolset.Data;
12 using WixToolset.Data.Symbols;
13 using Xunit;
14
15 public class BootstrapperApplicationFixture
16 {
17 [Fact]
18 public void CanSetBootstrapperApplicationDllDpiAwareness()
19 {
20 var folder = TestData.Get(@"TestData\BootstrapperApplication");
21
22 using (var fs = new DisposableFileSystem())
23 {
24 var baseFolder = fs.GetFolder();
25 var intermediateFolder = Path.Combine(baseFolder, "obj");
26 var wixlibPath = Path.Combine(intermediateFolder, @"test.wixlib");
27
28 var result = WixRunner.Execute(new[]
29 {
30 "build",
31 Path.Combine(folder, "DpiAwareness.wxs"),
32 "-intermediateFolder", intermediateFolder,
33 "-o", wixlibPath,
34 });
35
36 result.AssertSuccess();
37
38 var intermediate = Intermediate.Load(wixlibPath);
39 var allSymbols = intermediate.Sections.SelectMany(s => s.Symbols);
40 var baDllSymbol = allSymbols.OfType<WixBootstrapperApplicationDllSymbol>()
41 .SingleOrDefault();
42 Assert.NotNull(baDllSymbol);
43
44 Assert.Equal(WixBootstrapperApplicationDpiAwarenessType.GdiScaled, baDllSymbol.DpiAwareness);
45 }
46 }
47 }
48 }
49 #endif