diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2021-01-03 14:06:13 -0600 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2021-01-03 15:49:32 -0600 |
| commit | da9e593a5c044cf5430b071dd194b9d94877c4e1 (patch) | |
| tree | 76c11883bb4c399d67cc425dfacbda45ec063cfa /src/test/WixToolsetTest.CoreIntegration/BootstrapperApplicationFixture.cs | |
| parent | d5e31dec3a753f98955f3cde3d49a653cfc4aed0 (diff) | |
| download | wix-da9e593a5c044cf5430b071dd194b9d94877c4e1.tar.gz wix-da9e593a5c044cf5430b071dd194b9d94877c4e1.tar.bz2 wix-da9e593a5c044cf5430b071dd194b9d94877c4e1.zip | |
Fix parsing of DpiAwareness attribute.
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration/BootstrapperApplicationFixture.cs')
| -rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/BootstrapperApplicationFixture.cs | 46 |
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 | |||
| 3 | namespace 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 | } | ||
