diff options
Diffstat (limited to 'src/wix/test/WixToolsetTest.CoreIntegration/ExePackageFixture.cs')
-rw-r--r-- | src/wix/test/WixToolsetTest.CoreIntegration/ExePackageFixture.cs | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/ExePackageFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/ExePackageFixture.cs new file mode 100644 index 00000000..e2306dcd --- /dev/null +++ b/src/wix/test/WixToolsetTest.CoreIntegration/ExePackageFixture.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 WixBuildTools.TestSupport; | ||
7 | using WixToolset.Core.TestPackage; | ||
8 | using Xunit; | ||
9 | |||
10 | public class ExePackageFixture | ||
11 | { | ||
12 | [Fact] | ||
13 | public void ErrorWhenMissingDetectCondition() | ||
14 | { | ||
15 | var folder = TestData.Get(@"TestData", "ExePackage"); | ||
16 | |||
17 | using (var fs = new DisposableFileSystem()) | ||
18 | { | ||
19 | var baseFolder = fs.GetFolder(); | ||
20 | |||
21 | var result = WixRunner.Execute(new[] | ||
22 | { | ||
23 | "build", | ||
24 | Path.Combine(folder, "MissingDetectCondition.wxs"), | ||
25 | "-o", Path.Combine(baseFolder, "test.wixlib") | ||
26 | }); | ||
27 | |||
28 | Assert.Equal(1153, result.ExitCode); | ||
29 | } | ||
30 | } | ||
31 | |||
32 | [Fact] | ||
33 | public void ErrorWhenRequireDetectCondition() | ||
34 | { | ||
35 | var folder = TestData.Get(@"TestData", "ExePackage"); | ||
36 | |||
37 | using (var fs = new DisposableFileSystem()) | ||
38 | { | ||
39 | var baseFolder = fs.GetFolder(); | ||
40 | |||
41 | var result = WixRunner.Execute(new[] | ||
42 | { | ||
43 | "build", | ||
44 | Path.Combine(folder, "RequireDetectCondition.wxs"), | ||
45 | "-o", Path.Combine(baseFolder, "test.wixlib") | ||
46 | }); | ||
47 | |||
48 | Assert.Equal(401, result.ExitCode); | ||
49 | } | ||
50 | } | ||
51 | } | ||
52 | } | ||