diff options
| author | Rob Mensching <rob@firegiant.com> | 2019-10-07 11:18:13 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2019-10-07 11:59:14 -0700 |
| commit | 860676fa5b40a1904478151e9b4934c004e7db63 (patch) | |
| tree | 83fabd53f2a68dcf56bc8da66d88e115af3764b0 /src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs | |
| parent | 3b98dac62b47d590f3465985362d6e6fd100b1c0 (diff) | |
| download | wix-860676fa5b40a1904478151e9b4934c004e7db63.tar.gz wix-860676fa5b40a1904478151e9b4934c004e7db63.tar.bz2 wix-860676fa5b40a1904478151e9b4934c004e7db63.zip | |
Implement Bundle build
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs')
| -rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs b/src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs new file mode 100644 index 00000000..554f4b17 --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs | |||
| @@ -0,0 +1,52 @@ | |||
| 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.CoreIntegration | ||
| 4 | { | ||
| 5 | using System.IO; | ||
| 6 | using System.Linq; | ||
| 7 | using WixBuildTools.TestSupport; | ||
| 8 | using WixToolset.Core.TestPackage; | ||
| 9 | using WixToolset.Data; | ||
| 10 | using WixToolset.Data.Tuples; | ||
| 11 | using Xunit; | ||
| 12 | |||
| 13 | public class BundleFixture | ||
| 14 | { | ||
| 15 | [Fact] | ||
| 16 | public void CanBuildSimpleBundle() | ||
| 17 | { | ||
| 18 | var burnStubPath = TestData.Get(@"TestData\.Data\burn.exe"); | ||
| 19 | var folder = TestData.Get(@"TestData\SimpleBundle"); | ||
| 20 | |||
| 21 | using (var fs = new DisposableFileSystem()) | ||
| 22 | { | ||
| 23 | var baseFolder = fs.GetFolder(); | ||
| 24 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 25 | |||
| 26 | var result = WixRunner.Execute(new[] | ||
| 27 | { | ||
| 28 | "build", | ||
| 29 | Path.Combine(folder, "Bundle.wxs"), | ||
| 30 | "-loc", Path.Combine(folder, "Bundle.en-us.wxl"), | ||
| 31 | "-bindpath", Path.Combine(folder, "data"), | ||
| 32 | "-intermediateFolder", intermediateFolder, | ||
| 33 | "-burnStub", burnStubPath, | ||
| 34 | "-o", Path.Combine(baseFolder, @"bin\test.exe") | ||
| 35 | }); | ||
| 36 | |||
| 37 | result.AssertSuccess(); | ||
| 38 | |||
| 39 | Assert.True(File.Exists(Path.Combine(baseFolder, @"bin\test.exe"))); | ||
| 40 | #if TODO | ||
| 41 | Assert.True(File.Exists(Path.Combine(baseFolder, @"bin\test.wixpdb"))); | ||
| 42 | #endif | ||
| 43 | |||
| 44 | var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"test.wir")); | ||
| 45 | var section = intermediate.Sections.Single(); | ||
| 46 | |||
| 47 | var msiTuple = section.Tuples.OfType<WixBundlePackageTuple>().Single(); | ||
| 48 | Assert.Equal("test.msi", msiTuple.Id.Id ); | ||
| 49 | } | ||
| 50 | } | ||
| 51 | } | ||
| 52 | } | ||
