| 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.Http |
| 4 | { |
| 5 | using WixInternal.TestSupport; |
| 6 | using WixInternal.Core.TestPackage; |
| 7 | using WixToolset.Http; |
| 8 | using Xunit; |
| 9 | |
| 10 | public class HttpExtensionFixture |
| 11 | { |
| 12 | [Fact] |
| 13 | public void CanBuildUsingSniSssl() |
| 14 | { |
| 15 | var folder = TestData.Get("TestData", "SniSsl"); |
| 16 | var build = new Builder(folder, typeof(HttpExtensionFactory), new[] { folder }); |
| 17 | |
| 18 | var results = build.BuildAndQuery(Build, "CustomAction", "Wix4HttpSniSslCert"); |
| 19 | WixAssert.CompareLineByLine(new[] |
| 20 | { |
| 21 | "CustomAction:Wix4ExecHttpSniSslCertsInstall_X86\t3073\tWix4HttpCA_X86\tExecHttpSniSslCerts\t", |
| 22 | "CustomAction:Wix4ExecHttpSniSslCertsUninstall_X86\t3073\tWix4HttpCA_X86\tExecHttpSniSslCerts\t", |
| 23 | "CustomAction:Wix4RollbackHttpSniSslCertsInstall_X86\t3329\tWix4HttpCA_X86\tExecHttpSniSslCerts\t", |
| 24 | "CustomAction:Wix4RollbackHttpSniSslCertsUninstall_X86\t3329\tWix4HttpCA_X86\tExecHttpSniSslCerts\t", |
| 25 | "CustomAction:Wix4SchedHttpSniSslCertsInstall_X86\t1\tWix4HttpCA_X86\tSchedHttpSniSslCertsInstall\t", |
| 26 | "CustomAction:Wix4SchedHttpSniSslCertsUninstall_X86\t1\tWix4HttpCA_X86\tSchedHttpSniSslCertsUninstall\t", |
| 27 | "Wix4HttpSniSslCert:sslC9YX6_H7UL_WGBx4DoDGI.Sj.D0\texample.com\t8080\t[SOME_THUMBPRINT]\t\t\t2\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo", |
| 28 | }, results); |
| 29 | } |
| 30 | |
| 31 | [Fact] |
| 32 | public void CanBuildUsingUrlReservation() |
| 33 | { |
| 34 | var folder = TestData.Get(@"TestData\UsingUrlReservation"); |
| 35 | var build = new Builder(folder, typeof(HttpExtensionFactory), new[] { folder }); |
| 36 | |
| 37 | var results = build.BuildAndQuery(Build, "CustomAction", "Wix4HttpUrlAce", "Wix4HttpUrlReservation"); |
| 38 | WixAssert.CompareLineByLine(new[] |
| 39 | { |
| 40 | "CustomAction:Wix4ExecHttpUrlReservationsInstall_X86\t3073\tWix4HttpCA_X86\tExecHttpUrlReservations\t", |
| 41 | "CustomAction:Wix4ExecHttpUrlReservationsUninstall_X86\t3073\tWix4HttpCA_X86\tExecHttpUrlReservations\t", |
| 42 | "CustomAction:Wix4RollbackHttpUrlReservationsInstall_X86\t3329\tWix4HttpCA_X86\tExecHttpUrlReservations\t", |
| 43 | "CustomAction:Wix4RollbackHttpUrlReservationsUninstall_X86\t3329\tWix4HttpCA_X86\tExecHttpUrlReservations\t", |
| 44 | "CustomAction:Wix4SchedHttpUrlReservationsInstall_X86\t1\tWix4HttpCA_X86\tSchedHttpUrlReservationsInstall\t", |
| 45 | "CustomAction:Wix4SchedHttpUrlReservationsUninstall_X86\t1\tWix4HttpCA_X86\tSchedHttpUrlReservationsUninstall\t", |
| 46 | "Wix4HttpUrlAce:aceu5os2gQoblRmzwjt85LQf997uD4\turlO23FkY2xzEY54lY6E6sXFW6glXc\tNT SERVICE\\TestService\t268435456", |
| 47 | "Wix4HttpUrlReservation:urlO23FkY2xzEY54lY6E6sXFW6glXc\t0\t\thttp://+:80/vroot/\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo", |
| 48 | }, results); |
| 49 | } |
| 50 | |
| 51 | private static void Build(string[] args) |
| 52 | { |
| 53 | var result = WixRunner.Execute(args) |
| 54 | .AssertSuccess(); |
| 55 | } |
| 56 | } |
| 57 | } |