aboutsummaryrefslogtreecommitdiff
path: root/src/test/WixToolsetTest.BuildTasks/WixBuildTaskFixture.cs
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2020-06-03 14:01:28 +1000
committerSean Hall <r.sean.hall@gmail.com>2020-06-03 14:24:34 +1000
commit6bb2c3d5a2082c377a31bffe1bbdb950b5e15781 (patch)
treea68f4a40454748189198cd74f8fd285b14df1c80 /src/test/WixToolsetTest.BuildTasks/WixBuildTaskFixture.cs
parent874fb5fc3597d784a4e8ac07d735e3caa34417be (diff)
downloadwix-6bb2c3d5a2082c377a31bffe1bbdb950b5e15781.tar.gz
wix-6bb2c3d5a2082c377a31bffe1bbdb950b5e15781.tar.bz2
wix-6bb2c3d5a2082c377a31bffe1bbdb950b5e15781.zip
Get the inner exception test working in the MSBuild test project.
Diffstat (limited to 'src/test/WixToolsetTest.BuildTasks/WixBuildTaskFixture.cs')
-rw-r--r--src/test/WixToolsetTest.BuildTasks/WixBuildTaskFixture.cs43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/test/WixToolsetTest.BuildTasks/WixBuildTaskFixture.cs b/src/test/WixToolsetTest.BuildTasks/WixBuildTaskFixture.cs
index 92033766..cd41f16e 100644
--- a/src/test/WixToolsetTest.BuildTasks/WixBuildTaskFixture.cs
+++ b/src/test/WixToolsetTest.BuildTasks/WixBuildTaskFixture.cs
@@ -62,48 +62,5 @@ namespace WixToolsetTest.BuildTasks
62 Assert.Equal(@"test.txt", fileTuple[FileTupleFields.Source].PreviousValue.AsPath().Path); 62 Assert.Equal(@"test.txt", fileTuple[FileTupleFields.Source].PreviousValue.AsPath().Path);
63 } 63 }
64 } 64 }
65
66 [Fact(Skip = "Requires deleting wixnative.exe from output folder after build but before running the test.")]
67 public void ReportsInnerExceptionForUnexpectedExceptions()
68 {
69 var folder = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage");
70
71 using (var fs = new DisposableFileSystem())
72 {
73 var baseFolder = fs.GetFolder();
74 var intermediateFolder = Path.Combine(baseFolder, "obj");
75 var pdbPath = Path.Combine(baseFolder, @"bin\testpackage.wixpdb");
76 var engine = new FakeBuildEngine();
77
78 var task = new WixBuild
79 {
80 BuildEngine = engine,
81 SourceFiles = new[]
82 {
83 new TaskItem(Path.Combine(folder, "Package.wxs")),
84 new TaskItem(Path.Combine(folder, "PackageComponents.wxs")),
85 },
86 LocalizationFiles = new[]
87 {
88 new TaskItem(Path.Combine(folder, "Package.en-us.wxl")),
89 },
90 BindInputPaths = new[]
91 {
92 new TaskItem(Path.Combine(folder, "data")),
93 },
94 IntermediateDirectory = new TaskItem(intermediateFolder),
95 OutputFile = new TaskItem(Path.Combine(baseFolder, @"bin\test.msi")),
96 PdbType = "Full",
97 PdbFile = new TaskItem(pdbPath),
98 };
99
100 var result = task.Execute();
101 Assert.False(result, $"MSBuild task succeeded unexpectedly. Output:\r\n{engine.Output}");
102
103 Assert.Contains(
104 "System.PlatformNotSupportedException: Could not find platform specific 'wixnative.exe' ---> System.IO.FileNotFoundException: Could not find internal piece of WiX Toolset from",
105 engine.Output);
106 }
107 }
108 } 65 }
109} 66}