-
Notifications
You must be signed in to change notification settings - Fork 292
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automate the test for GetRelatedBundleVariable.
- Loading branch information
Showing
15 changed files
with
97 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 2 additions & 10 deletions
12
...n/TestData/Manual/BundleD/BundleD.wixproj → .../BAFunctionsTests/BundleAv1/BundleA.props
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,14 @@ | ||
<!-- 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. --> | ||
<Project Sdk="WixToolset.Sdk"> | ||
<Project> | ||
<PropertyGroup> | ||
<OutputType>Bundle</OutputType> | ||
<BA>customHyperlinkLicense</BA> | ||
<BA>hyperlinkLicense</BA> | ||
<UpgradeCode>{98ACBCF6-B54A-46AF-8990-DFB8795B965B}</UpgradeCode> | ||
<Version Condition=" '$(Version)' == '' ">1.0.0.0</Version> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\BafRelatedBundleVariableTesting\BafRelatedBundleVariableTesting.vcxproj" Properties="Platform=x86" ReferenceOutputAssembly="false" /> | ||
<ProjectReference Include="..\PackageA\PackageA.wixproj" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="WixToolset.Bal.wixext" /> | ||
</ItemGroup> | ||
<Target Name="CopyManualInstructions" AfterTargets="AfterBuild"> | ||
<Copy SourceFiles="ManualTests.txt" DestinationFiles="$(OutputPath)ManualTests.txt" /> | ||
</Target> | ||
</Project> |
10 changes: 10 additions & 0 deletions
10
src/test/burn/TestData/BAFunctionsTests/BundleAv1/BundleAv1.wixproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!-- 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. --> | ||
<Project Sdk="WixToolset.Sdk"> | ||
<Import Project="BundleA.props" /> | ||
<ItemGroup> | ||
<ProjectReference Include="..\PackageAv1\PackageAv1.wixproj" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="WixToolset.Bal.wixext" /> | ||
</ItemGroup> | ||
</Project> |
8 changes: 3 additions & 5 deletions
8
.../burn/TestData/Manual/BundleD/BundleD.wxs → .../BAFunctionsTests/BundleAv1/BundleAv1.wxs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/test/burn/TestData/BAFunctionsTests/BundleAv2/BundleAv2.wixproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- 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. --> | ||
<Project Sdk="WixToolset.Sdk"> | ||
<Import Project="..\BundleAv1\BundleA.props" /> | ||
<PropertyGroup> | ||
<Version>2.0.0.0</Version> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\PackageAv2\PackageAv2.wixproj" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="WixToolset.Bal.wixext" /> | ||
</ItemGroup> | ||
</Project> |
15 changes: 15 additions & 0 deletions
15
src/test/burn/TestData/BAFunctionsTests/BundleAv2/BundleAv2.wxs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!-- 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. --> | ||
|
||
|
||
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | ||
<Fragment> | ||
<BootstrapperApplication> | ||
<Payload SourceFile="$(var.BafRelatedBundleVariableTesting.TargetPath)" bal:BAFunctions="yes" /> | ||
</BootstrapperApplication> | ||
<PackageGroup Id="BundlePackages"> | ||
<MsiPackage Id="PackageA" SourceFile="$(var.PackageAv2.TargetPath)" /> | ||
</PackageGroup> | ||
<Variable Name="ANumber" bal:Overridable="yes" Value="4242" Persisted="yes" /> | ||
<Variable Name="AString" bal:Overridable="yes" Value="This is a test v2" Persisted="yes" /> | ||
</Fragment> | ||
</Wix> |
9 changes: 9 additions & 0 deletions
9
src/test/burn/TestData/BAFunctionsTests/PackageAv1/PackageA.props
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!-- 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. --> | ||
<Project> | ||
<PropertyGroup> | ||
<UpgradeCode>{F5E0E236-395D-4E7F-BE0A-00B20F7EAF4B}</UpgradeCode> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="..\..\Templates\Package.wxs" Link="Package.wxs" /> | ||
</ItemGroup> | ||
</Project> |
4 changes: 4 additions & 0 deletions
4
src/test/burn/TestData/BAFunctionsTests/PackageAv1/PackageAv1.wixproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<!-- 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. --> | ||
<Project Sdk="WixToolset.Sdk"> | ||
<Import Project="PackageA.props" /> | ||
</Project> |
7 changes: 7 additions & 0 deletions
7
src/test/burn/TestData/BAFunctionsTests/PackageAv2/PackageAv2.wixproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<!-- 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. --> | ||
<Project Sdk="WixToolset.Sdk"> | ||
<Import Project="..\PackageAv1\PackageA.props" /> | ||
<PropertyGroup> | ||
<Version>2.0.0.0</Version> | ||
</PropertyGroup> | ||
</Project> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// 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.BurnE2E | ||
{ | ||
using WixTestTools; | ||
using Xunit; | ||
using Xunit.Abstractions; | ||
|
||
public class BAFunctionsTests : BurnE2ETests | ||
{ | ||
public BAFunctionsTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } | ||
|
||
[RuntimeFact] | ||
public void LogsPersistedRelatedBundleVariables() | ||
{ | ||
this.CreatePackageInstaller("PackageAv1"); | ||
this.CreatePackageInstaller("PackageAv2"); | ||
var bundleAv1 = this.CreateBundleInstaller("BundleAv1"); | ||
var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); | ||
|
||
bundleAv1.Install(); | ||
bundleAv1.VerifyRegisteredAndInPackageCache(); | ||
|
||
var bundleAv2InstallLogFilePath = bundleAv2.Install(); | ||
bundleAv2.VerifyRegisteredAndInPackageCache(); | ||
|
||
Assert.True(LogVerifier.MessageInLogFileRegex(bundleAv2InstallLogFilePath, @"Retrieved related bundle variable with BAFunctions: ANumber = 42")); | ||
Assert.True(LogVerifier.MessageInLogFileRegex(bundleAv2InstallLogFilePath, @"Retrieved related bundle variable with BAFunctions: AString = This is a test")); | ||
} | ||
} | ||
} |