diff options
Diffstat (limited to 'src/WixToolset.Core.TestPackage/WixRunnerResult.cs')
-rw-r--r-- | src/WixToolset.Core.TestPackage/WixRunnerResult.cs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/WixToolset.Core.TestPackage/WixRunnerResult.cs b/src/WixToolset.Core.TestPackage/WixRunnerResult.cs new file mode 100644 index 00000000..45e31c2d --- /dev/null +++ b/src/WixToolset.Core.TestPackage/WixRunnerResult.cs | |||
@@ -0,0 +1,22 @@ | |||
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 WixToolset.Core.TestPackage | ||
4 | { | ||
5 | using System; | ||
6 | using System.Linq; | ||
7 | using WixToolset.Data; | ||
8 | using Xunit; | ||
9 | |||
10 | public class WixRunnerResult | ||
11 | { | ||
12 | public int ExitCode { get; set; } | ||
13 | |||
14 | public Message[] Messages { get; set; } | ||
15 | |||
16 | public WixRunnerResult AssertSuccess() | ||
17 | { | ||
18 | Assert.True(0 == this.ExitCode, $"MSBuild failed unexpectedly. Output:\r\n{String.Join("\r\n", this.Messages.Select(m => m.ToString()).ToArray())}"); | ||
19 | return this; | ||
20 | } | ||
21 | } | ||
22 | } | ||