diff options
author | Rob Mensching <rob@firegiant.com> | 2017-10-16 23:48:48 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2017-10-16 23:48:48 -0700 |
commit | 6dd045318f7ee405e92e76d311ad1424c20157c1 (patch) | |
tree | aef4f03fcad4990f22252956a57f62063f221722 /src/test/WixToolsetTest.CoreIntegrationFixture/ProgramFixture.cs | |
parent | dbde9e7104b907bbbaea17e21247d8cafc8b3a4c (diff) | |
download | wix-6dd045318f7ee405e92e76d311ad1424c20157c1.tar.gz wix-6dd045318f7ee405e92e76d311ad1424c20157c1.tar.bz2 wix-6dd045318f7ee405e92e76d311ad1424c20157c1.zip |
Introduce integration test
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegrationFixture/ProgramFixture.cs')
-rw-r--r-- | src/test/WixToolsetTest.CoreIntegrationFixture/ProgramFixture.cs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegrationFixture/ProgramFixture.cs b/src/test/WixToolsetTest.CoreIntegrationFixture/ProgramFixture.cs new file mode 100644 index 00000000..bc2786e9 --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegrationFixture/ProgramFixture.cs | |||
@@ -0,0 +1,32 @@ | |||
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.CoreIntegrationFixture | ||
4 | { | ||
5 | using System.IO; | ||
6 | using WixToolset.Core; | ||
7 | using WixToolsetTest.CoreIntegrationFixture.Utility; | ||
8 | using Xunit; | ||
9 | |||
10 | public class ProgramFixture | ||
11 | { | ||
12 | [Fact] | ||
13 | public void CanBuildSingleFile() | ||
14 | { | ||
15 | var folder = TestData.Get(@"TestData\SingleFile"); | ||
16 | |||
17 | using (var fs = new DisposableFileSystem()) | ||
18 | using (var pushd = new Pushd(folder)) | ||
19 | { | ||
20 | var intermediateFolder = fs.GetFolder(); | ||
21 | |||
22 | var program = new Program(); | ||
23 | var result = program.Run(new[] { "build", "Package.wxs", "PackageComponents.wxs", "-loc", "Package.en-us.wxl", "-bindpath", "data", "-intermediateFolder", intermediateFolder, "-o", $@"{intermediateFolder}\bin\test.msi" }); | ||
24 | |||
25 | Assert.Equal(0, result); | ||
26 | Assert.True(File.Exists(Path.Combine(intermediateFolder, @"bin\test.msi"))); | ||
27 | Assert.True(File.Exists(Path.Combine(intermediateFolder, @"bin\test.wixpdb"))); | ||
28 | Assert.True(File.Exists(Path.Combine(intermediateFolder, @"bin\MsiPackage\test.txt"))); | ||
29 | } | ||
30 | } | ||
31 | } | ||
32 | } | ||