aboutsummaryrefslogtreecommitdiff
path: root/src/test/WixToolsetTest.DirectX/DirectXExtensionFixture.cs
blob: 81a5fb000e65bee89d7b0775673868ea8fe937bb (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
25
26
27
28
29
30
31
32
// 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 WixToolsetTest.DirectX
{
    using System.Linq;
    using WixBuildTools.TestSupport;
    using WixToolset.Core.TestPackage;
    using WixToolset.DirectX;
    using Xunit;

    public class DirectXExtensionFixture
    {
        [Fact]
        public void CanBuildUsingPixelShaderVersion()
        {
            var folder = TestData.Get(@"TestData\UsingPixelShaderVersion");
            var build = new Builder(folder, typeof(DirectXExtensionFactory), new[] { folder });

            var results = build.BuildAndQuery(Build, "CustomAction");
            Assert.Equal(new[]
            {
                "CustomAction:WixQueryDirectXCaps\t65\tDirectXCA\tWixQueryDirectXCaps\t",
            }, results);
        }

        private static void Build(string[] args)
        {
            var result = WixRunner.Execute(args)
                                  .AssertSuccess();
        }
    }
}