aboutsummaryrefslogtreecommitdiff
path: root/src/test/burn/WixTestTools/ArpEntryVerifier.cs
blob: b3c70337d862ee640c50be21eeb2626691406939 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// 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.

namespace WixTestTools
{
    using Xunit;

    public partial class ArpEntryInstaller
    {
        public bool TryGetRegistration(out GenericArpRegistration registration)
        {
            bool success = !this.PerMachine ? GenericArpRegistration.TryGetPerUserRegistrationById(this.ArpId, out registration)
                                            : GenericArpRegistration.TryGetPerMachineRegistrationById(this.ArpId, this.X64, out registration);

            return success;
        }

        public void VerifyRegistered(bool registered)
        {
            bool success = this.TryGetRegistration(out _);

            Assert.Equal(registered, success);
        }
    }
}