diff options
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration/BundleExtractionFixture.cs')
| -rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/BundleExtractionFixture.cs | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/BundleExtractionFixture.cs b/src/test/WixToolsetTest.CoreIntegration/BundleExtractionFixture.cs deleted file mode 100644 index b33b8891..00000000 --- a/src/test/WixToolsetTest.CoreIntegration/BundleExtractionFixture.cs +++ /dev/null | |||
| @@ -1,58 +0,0 @@ | |||
| 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; | ||
| 9 | using WixToolset.Core.TestPackage; | ||
| 10 | using WixToolset.Data; | ||
| 11 | using WixToolset.Extensibility.Services; | ||
| 12 | using Xunit; | ||
| 13 | |||
| 14 | public class BundleExtractionFixture | ||
| 15 | { | ||
| 16 | [Fact] | ||
| 17 | public void CanExtractBundleWithDetachedContainer() | ||
| 18 | { | ||
| 19 | var folder = TestData.Get(@"TestData"); | ||
| 20 | |||
| 21 | using (var fs = new DisposableFileSystem()) | ||
| 22 | { | ||
| 23 | var baseFolder = fs.GetFolder(); | ||
| 24 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 25 | var exePath = Path.Combine(baseFolder, @"bin\test.exe"); | ||
| 26 | var pdbPath = Path.Combine(baseFolder, @"bin\test.wixpdb"); | ||
| 27 | var extractFolderPath = Path.Combine(baseFolder, "extract"); | ||
| 28 | var baFolderPath = Path.Combine(extractFolderPath, "UX"); | ||
| 29 | var attachedContainerFolderPath = Path.Combine(extractFolderPath, "AttachedContainer"); | ||
| 30 | |||
| 31 | // TODO: use WixRunner.Execute(string[]) to always go through the command line. | ||
| 32 | var serviceProvider = WixToolsetServiceProviderFactory.CreateServiceProvider(); | ||
| 33 | var result = WixRunner.Execute(new[] | ||
| 34 | { | ||
| 35 | "build", | ||
| 36 | Path.Combine(folder, "BundleWithDetachedContainer", "Bundle.wxs"), | ||
| 37 | Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"), | ||
| 38 | Path.Combine(folder, "BundleWithPackageGroupRef", "MinimalPackageGroup.wxs"), | ||
| 39 | "-bindpath", Path.Combine(folder, "SimpleBundle", "data"), | ||
| 40 | "-bindpath", Path.Combine(folder, ".Data"), | ||
| 41 | "-intermediateFolder", intermediateFolder, | ||
| 42 | "-o", exePath, | ||
| 43 | }, serviceProvider, out var messages).Result; | ||
| 44 | |||
| 45 | WixRunnerResult.AssertSuccess(result, messages); | ||
| 46 | Assert.Empty(messages.Where(m => m.Level == MessageLevel.Warning)); | ||
| 47 | |||
| 48 | Assert.True(File.Exists(exePath)); | ||
| 49 | |||
| 50 | var unbinder = serviceProvider.GetService<IUnbinder>(); | ||
| 51 | unbinder.Unbind(exePath, OutputType.Bundle, extractFolderPath); | ||
| 52 | |||
| 53 | Assert.True(File.Exists(Path.Combine(baFolderPath, "manifest.xml"))); | ||
| 54 | Assert.False(Directory.Exists(attachedContainerFolderPath)); | ||
| 55 | } | ||
| 56 | } | ||
| 57 | } | ||
| 58 | } | ||
