| 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.BurnE2E |
| 4 | { |
| 5 | using WixTestTools; |
| 6 | using Xunit.Abstractions; |
| 7 | |
| 8 | public class ElevationTests : BurnE2ETests |
| 9 | { |
| 10 | public ElevationTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } |
| 11 | |
| 12 | /// <summary> |
| 13 | /// This test calls Elevate after Detect, and then calls Plan in OnElevateBegin. |
| 14 | /// After calling Plan, it pumps some messages to simulate UI like the UAC callback. |
| 15 | /// </summary> |
| 16 | [RuntimeFact] |
| 17 | public void CanExplicitlyElevateAndPlanFromOnElevateBegin() |
| 18 | { |
| 19 | var packageA = this.CreatePackageInstaller("PackageA"); |
| 20 | var bundleA = this.CreateBundleInstaller("BundleA"); |
| 21 | var testBAController = this.CreateTestBAController(); |
| 22 | |
| 23 | testBAController.SetExplicitlyElevateAndPlanFromOnElevateBegin(); |
| 24 | |
| 25 | bundleA.Install(); |
| 26 | bundleA.VerifyRegisteredAndInPackageCache(); |
| 27 | packageA.VerifyInstalled(true); |
| 28 | } |
| 29 | } |
| 30 | } |