main
cs 39 lines 1.72 KB
Raw
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.Dependency
4 {
5 using System.Linq;
6 using System.Text.RegularExpressions;
7 using WixInternal.TestSupport;
8 using WixInternal.Core.TestPackage;
9 using WixToolset.Dependency;
10 using Xunit;
11
12 public class DependencyExtensionFixture
13 {
14 [Fact]
15 public void CanBuildUsingProvides()
16 {
17 var folder = TestData.Get(@"TestData\UsingProvides");
18 var build = new Builder(folder, typeof(DependencyExtensionFactory), new[] { folder });
19
20 var results = build.BuildAndQuery(Build, "CustomAction", "Wix4DependencyProvider", "Wix4Dependency")
21 .Select(r => Regex.Replace(r, "{[^}]*}", "{*}"))
22 .ToArray();
23 WixAssert.CompareLineByLine(new[]
24 {
25 "CustomAction:Wix4DependencyCheck_X86\t1\tDependencyCA_X86\tWixDependencyCheck\t",
26 "CustomAction:Wix4DependencyRequire_X86\t1\tDependencyCA_X86\tWixDependencyRequire\t",
27 "Wix4Dependency:depL8BNflcqZaN5CQEWh2U3SBHFDdg\tUsingRequires\t1.0.0-beta.9\t\t0",
28 "Wix4DependencyProvider:dep74OfIcniaqxA7EprRGBw4Oyy3r8\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tUsingProvides\t\t\t",
29 "Wix4DependencyProvider:depTpv28q7slcxvXPWmU4Z0GfbiI.4\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\t{*}\t\t\t",
30 }, results);
31 }
32
33 private static void Build(string[] args)
34 {
35 var result = WixRunner.Execute(args)
36 .AssertSuccess();
37 }
38 }
39 }