aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2018-12-16 17:21:36 -0600
committerSean Hall <r.sean.hall@gmail.com>2018-12-16 17:26:16 -0600
commitaec6e9a4b21accd2e8aeb2cb36ad1cdc8f308f79 (patch)
tree4ebc8374ad56b99f00b8d09328e9baed3f2081d6 /src/test
parent4818bb24e8f7f22345f90393239ce92129238ecc (diff)
downloadwix-aec6e9a4b21accd2e8aeb2cb36ad1cdc8f308f79.tar.gz
wix-aec6e9a4b21accd2e8aeb2cb36ad1cdc8f308f79.tar.bz2
wix-aec6e9a4b21accd2e8aeb2cb36ad1cdc8f308f79.zip
Integrate into latest v4.
Still needs TupleDefinitions and Messages.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/WixToolsetTest.Iis/IisExtensionFixture.cs32
-rw-r--r--src/test/WixToolsetTest.Iis/TestData/UsingIis/Package.en-us.wxl11
-rw-r--r--src/test/WixToolsetTest.Iis/TestData/UsingIis/Package.wxs22
-rw-r--r--src/test/WixToolsetTest.Iis/TestData/UsingIis/PackageComponents.wxs15
-rw-r--r--src/test/WixToolsetTest.Iis/TestData/UsingIis/example.txt1
-rw-r--r--src/test/WixToolsetTest.Iis/WixToolsetTest.Iis.csproj42
6 files changed, 123 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.Iis/IisExtensionFixture.cs b/src/test/WixToolsetTest.Iis/IisExtensionFixture.cs
new file mode 100644
index 00000000..2adb2e93
--- /dev/null
+++ b/src/test/WixToolsetTest.Iis/IisExtensionFixture.cs
@@ -0,0 +1,32 @@
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
3namespace WixToolsetTest.Iis
4{
5 using System.Linq;
6 using WixBuildTools.TestSupport;
7 using WixToolset.Core.TestPackage;
8 using WixToolset.Iis;
9 using Xunit;
10
11 public class IisExtensionFixture
12 {
13 [Fact]
14 public void CanBuildUsingFileShare()
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, "IIsWebAddress");
20 Assert.Equal(new[]
21 {
22 "IIsWebAddress:",
23 }, results.OrderBy(s => s).ToArray());
24 }
25
26 private static void Build(string[] args)
27 {
28 var result = WixRunner.Execute(args)
29 .AssertSuccess();
30 }
31 }
32}
diff --git a/src/test/WixToolsetTest.Iis/TestData/UsingIis/Package.en-us.wxl b/src/test/WixToolsetTest.Iis/TestData/UsingIis/Package.en-us.wxl
new file mode 100644
index 00000000..38c12ac1
--- /dev/null
+++ b/src/test/WixToolsetTest.Iis/TestData/UsingIis/Package.en-us.wxl
@@ -0,0 +1,11 @@
1<?xml version="1.0" encoding="utf-8"?>
2
3<!--
4This file contains the declaration of all the localizable strings.
5-->
6<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US">
7
8 <String Id="DowngradeError">A newer version of [ProductName] is already installed.</String>
9 <String Id="FeatureTitle">MsiPackage</String>
10
11</WixLocalization>
diff --git a/src/test/WixToolsetTest.Iis/TestData/UsingIis/Package.wxs b/src/test/WixToolsetTest.Iis/TestData/UsingIis/Package.wxs
new file mode 100644
index 00000000..68ff98fd
--- /dev/null
+++ b/src/test/WixToolsetTest.Iis/TestData/UsingIis/Package.wxs
@@ -0,0 +1,22 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 <Product Id="*" Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a">
4 <Package InstallerVersion="200" Compressed="no" InstallScope="perMachine" />
5
6 <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" />
7 <MediaTemplate />
8
9 <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)">
10 <ComponentGroupRef Id="ProductComponents" />
11 </Feature>
12
13 </Product>
14
15 <Fragment>
16 <Directory Id="TARGETDIR" Name="SourceDir">
17 <Directory Id="ProgramFilesFolder">
18 <Directory Id="INSTALLFOLDER" Name="MsiPackage" />
19 </Directory>
20 </Directory>
21 </Fragment>
22</Wix>
diff --git a/src/test/WixToolsetTest.Iis/TestData/UsingIis/PackageComponents.wxs b/src/test/WixToolsetTest.Iis/TestData/UsingIis/PackageComponents.wxs
new file mode 100644
index 00000000..29c6956d
--- /dev/null
+++ b/src/test/WixToolsetTest.Iis/TestData/UsingIis/PackageComponents.wxs
@@ -0,0 +1,15 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
3 xmlns:iis="http://wixtoolset.org/schemas/v4/wxs/iis">
4 <Fragment>
5 <Property Id="PORT" Value="3062" />
6 <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
7 <Component>
8 <File Source="example.txt" />
9 <iis:WebSite Id="Test" Description="Test web server" Directory="TestWebSiteProductDirectory" AutoStart="yes" DirProperties="ReadAndExecute" ConfigureIfExists="no" >
10 <iis:WebAddress Id="TestAddress" Port="[PORT]" Secure="no" />
11 </iis:WebSite>
12 </Component>
13 </ComponentGroup>
14 </Fragment>
15</Wix>
diff --git a/src/test/WixToolsetTest.Iis/TestData/UsingIis/example.txt b/src/test/WixToolsetTest.Iis/TestData/UsingIis/example.txt
new file mode 100644
index 00000000..1b4ffe8a
--- /dev/null
+++ b/src/test/WixToolsetTest.Iis/TestData/UsingIis/example.txt
@@ -0,0 +1 @@
This is example.txt. \ No newline at end of file
diff --git a/src/test/WixToolsetTest.Iis/WixToolsetTest.Iis.csproj b/src/test/WixToolsetTest.Iis/WixToolsetTest.Iis.csproj
new file mode 100644
index 00000000..92e3b8b4
--- /dev/null
+++ b/src/test/WixToolsetTest.Iis/WixToolsetTest.Iis.csproj
@@ -0,0 +1,42 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- 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. -->
3
4<Project Sdk="Microsoft.NET.Sdk">
5 <PropertyGroup>
6 <TargetFramework>netcoreapp2.1</TargetFramework>
7 <IsPackable>false</IsPackable>
8 </PropertyGroup>
9
10 <PropertyGroup>
11 <NoWarn>NU1701</NoWarn>
12 </PropertyGroup>
13
14 <ItemGroup>
15 <Content Include="TestData\UsingIis\example.txt" CopyToOutputDirectory="PreserveNewest" />
16 <Content Include="TestData\UsingIis\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" />
17 <Content Include="TestData\UsingIis\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
18 <Content Include="TestData\UsingIis\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" />
19 </ItemGroup>
20
21 <ItemGroup>
22 <ProjectReference Include="..\..\wixext\WixToolset.Iis.wixext.csproj" />
23 </ItemGroup>
24
25 <ItemGroup>
26 <PackageReference Include="WixToolset.Core.TestPackage" Version="4.0.*" Condition=" '$(Configuration)' == 'Release' Or !Exists('$(WixToolsetRootFolder)\Core\README.md') " PrivateAssets="all" />
27 <ProjectReference Include="$(WixToolsetRootFolder)\Core\src\WixToolset.Core.TestPackage\WixToolset.Core.TestPackage.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Core\README.md') " />
28 <ProjectReference Include="$(WixToolsetRootFolder)\Core\src\WixToolset.Core\WixToolset.Core.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Core\README.md') " />
29 <ProjectReference Include="$(WixToolsetRootFolder)\Core\src\WixToolset.Core.Burn\WixToolset.Core.Burn.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Core\README.md') " />
30 <ProjectReference Include="$(WixToolsetRootFolder)\Core\src\WixToolset.Core.WindowsInstaller\WixToolset.Core.WindowsInstaller.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Core\README.md') " />
31 </ItemGroup>
32
33 <ItemGroup>
34 <PackageReference Include="WixBuildTools.TestSupport" Version="4.0.*" />
35 </ItemGroup>
36
37 <ItemGroup>
38 <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
39 <PackageReference Include="xunit" Version="2.4.0" />
40 <PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
41 </ItemGroup>
42</Project>