main
cs 40 lines 1.51 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.Iis
4 {
5 using System.Linq;
6 using WixInternal.TestSupport;
7 using WixInternal.Core.TestPackage;
8 using WixToolset.Iis;
9 using Xunit;
10
11 public class IisExtensionFixture
12 {
13 [Fact]
14 public void CanBuildUsingIIs()
15 {
16 var folder = TestData.Get(@"TestData\UsingIis");
17 var build = new Builder(folder, typeof(IisExtensionFactory), new[] { folder });
18
19 var results = build.BuildAndQuery(Build, validate: true, "Wix4Certificate", "Wix4CertificateHash", "Wix4IIsWebSite", "Wix4IIsWebAddress");
20 WixAssert.CompareLineByLine(new[]
21 {
22 "Wix4Certificate:Certificate.MyCert\tMyCert\tMyCert certificate\t2\tTrustedPublisher\t14\tMyCertBits\t\t",
23 "Wix4IIsWebAddress:TestAddress\tTest\t\t[PORT]\t\t0",
24 "Wix4IIsWebSite:Test\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tTest web server\t\tTestWebSiteProductDirectory\t2\t2\tTestAddress\tReadAndExecute\t\t\t\t",
25 }, results);
26 }
27
28 private static void Build(string[] args)
29 {
30 var newArgs = args.ToList();
31
32 if (args.First() == "build")
33 {
34 newArgs.AddRange(new[] { "-arch", "x64" });
35 }
36
37 WixRunner.Execute(newArgs.ToArray()).AssertSuccess();
38 }
39 }
40 }