diff options
Diffstat (limited to 'src/ext/PowerShell/test/WixToolsetTest.PowerShell/PowerShellExtensionFixture.cs')
| -rw-r--r-- | src/ext/PowerShell/test/WixToolsetTest.PowerShell/PowerShellExtensionFixture.cs | 26 |
1 files changed, 26 insertions, 0 deletions
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 @@ | |||
| 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.PowerShell | ||
| 4 | { | ||
| 5 | using WixBuildTools.TestSupport; | ||
| 6 | using WixToolset.Core.TestPackage; | ||
| 7 | using WixToolset.PowerShell; | ||
| 8 | using Xunit; | ||
| 9 | |||
| 10 | public class PowerShellExtensionFixture | ||
| 11 | { | ||
| 12 | [Fact] | ||
| 13 | public void CantBuildUsingTypesFileWithoutSnapIn() | ||
| 14 | { | ||
| 15 | var folder = TestData.Get(@"TestData\TypesFile"); | ||
| 16 | var build = new Builder(folder, typeof(PowerShellExtensionFactory), new[] { folder }); | ||
| 17 | |||
| 18 | WixRunnerResult wixRunnerResult = null; | ||
| 19 | var results = build.BuildAndQuery(args => { | ||
| 20 | wixRunnerResult = WixRunner.Execute(args); | ||
| 21 | }); | ||
| 22 | Assert.NotNull(wixRunnerResult); | ||
| 23 | Assert.Equal((int)PSErrors.Ids.NeitherIdSpecified, wixRunnerResult.ExitCode); | ||
| 24 | } | ||
| 25 | } | ||
| 26 | } | ||
