From 6f6e4ced9f398ff37a44b91fdba62479cde29d06 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Thu, 9 Jun 2022 15:30:48 -0500 Subject: Implement ArpEntry flavored ExePackage. 6772 --- src/test/burn/WixTestTools/ArpEntryVerifier.cs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/test/burn/WixTestTools/ArpEntryVerifier.cs (limited to 'src/test/burn/WixTestTools/ArpEntryVerifier.cs') diff --git a/src/test/burn/WixTestTools/ArpEntryVerifier.cs b/src/test/burn/WixTestTools/ArpEntryVerifier.cs new file mode 100644 index 00000000..b3c70337 --- /dev/null +++ b/src/test/burn/WixTestTools/ArpEntryVerifier.cs @@ -0,0 +1,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); + } + } +} -- cgit v1.2.3-55-g6feb