From 59765d27eb205b7b62a5057cfb631caee97f0af6 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Tue, 4 May 2021 22:49:35 -0700 Subject: Move PowerShell.wixext into ext --- .../PowerShellExtensionFixture.cs | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/ext/PowerShell/test/WixToolsetTest.PowerShell/PowerShellExtensionFixture.cs (limited to 'src/ext/PowerShell/test/WixToolsetTest.PowerShell/PowerShellExtensionFixture.cs') diff --git a/src/ext/PowerShell/test/WixToolsetTest.PowerShell/PowerShellExtensionFixture.cs b/src/ext/PowerShell/test/WixToolsetTest.PowerShell/PowerShellExtensionFixture.cs new file mode 100644 index 00000000..b2f27ecf --- /dev/null +++ b/src/ext/PowerShell/test/WixToolsetTest.PowerShell/PowerShellExtensionFixture.cs @@ -0,0 +1,26 @@ +// 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.PowerShell +{ + using WixBuildTools.TestSupport; + using WixToolset.Core.TestPackage; + using WixToolset.PowerShell; + using Xunit; + + public class PowerShellExtensionFixture + { + [Fact] + public void CantBuildUsingTypesFileWithoutSnapIn() + { + var folder = TestData.Get(@"TestData\TypesFile"); + var build = new Builder(folder, typeof(PowerShellExtensionFactory), new[] { folder }); + + WixRunnerResult wixRunnerResult = null; + var results = build.BuildAndQuery(args => { + wixRunnerResult = WixRunner.Execute(args); + }); + Assert.NotNull(wixRunnerResult); + Assert.Equal((int)PSErrors.Ids.NeitherIdSpecified, wixRunnerResult.ExitCode); + } + } +} -- cgit v1.2.3-55-g6feb