| 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.Msmq |
| 4 | { |
| 5 | using System.Linq; |
| 6 | using WixInternal.TestSupport; |
| 7 | using WixInternal.Core.TestPackage; |
| 8 | using WixToolset.Msmq; |
| 9 | using Xunit; |
| 10 | |
| 11 | public class MsmqExtensionFixture |
| 12 | { |
| 13 | [Fact] |
| 14 | public void CanBuildUsingMessageQueue() |
| 15 | { |
| 16 | var folder = TestData.Get(@"TestData\UsingMessageQueue"); |
| 17 | var build = new Builder(folder, typeof(MsmqExtensionFactory), new[] { folder }); |
| 18 | |
| 19 | var results = build.BuildAndQuery(Build, "Wix4MessageQueue", "CustomAction"); |
| 20 | WixAssert.CompareLineByLine(new[] |
| 21 | { |
| 22 | "CustomAction:Wix4MessageQueuingExecuteInstall_A64\t3073\tWix4MsmqCA_A64\tMessageQueuingExecuteInstall\t", |
| 23 | "CustomAction:Wix4MessageQueuingExecuteUninstall_A64\t3073\tWix4MsmqCA_A64\tMessageQueuingExecuteUninstall\t", |
| 24 | "CustomAction:Wix4MessageQueuingInstall_A64\t1\tWix4MsmqCA_A64\tMessageQueuingInstall\t", |
| 25 | "CustomAction:Wix4MessageQueuingRollbackInstall_A64\t3329\tWix4MsmqCA_A64\tMessageQueuingRollbackInstall\t", |
| 26 | "CustomAction:Wix4MessageQueuingRollbackUninstall_A64\t3329\tWix4MsmqCA_A64\tMessageQueuingRollbackUninstall\t", |
| 27 | "CustomAction:Wix4MessageQueuingUninstall_A64\t1\tWix4MsmqCA_A64\tMessageQueuingUninstall\t", |
| 28 | "Wix4MessageQueue:TestMQ\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\t\t\tMQLabel\t\tMQPath\t\t\t\t0", |
| 29 | }, results); |
| 30 | } |
| 31 | |
| 32 | private static void Build(string[] args) |
| 33 | { |
| 34 | args = args.Concat(new[] { "-arch", "arm64" }).ToArray(); |
| 35 | |
| 36 | var result = WixRunner.Execute(args); |
| 37 | result.AssertSuccess(); |
| 38 | } |
| 39 | } |
| 40 | } |