main
cs 26 lines 989 Bytes
Raw
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 WixInternal.TestSupport;
6 using WixInternal.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 }