aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.TestPackage/WixRunnerResult.cs
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2018-10-03 14:29:38 -0700
committerRob Mensching <rob@robmensching.com>2018-10-03 14:41:49 -0700
commita0d67c99eb5be2ce6e83f9a8a46d52b61d9871dc (patch)
treeadcb4a87903e66eb390d066a0315d309d4da3b58 /src/WixToolset.Core.TestPackage/WixRunnerResult.cs
parent60587a146d228956ec2c750ebe7b3a76a21f8f26 (diff)
downloadwix-a0d67c99eb5be2ce6e83f9a8a46d52b61d9871dc.tar.gz
wix-a0d67c99eb5be2ce6e83f9a8a46d52b61d9871dc.tar.bz2
wix-a0d67c99eb5be2ce6e83f9a8a46d52b61d9871dc.zip
Add WixRunnerResult to improve success assertion
Diffstat (limited to 'src/WixToolset.Core.TestPackage/WixRunnerResult.cs')
-rw-r--r--src/WixToolset.Core.TestPackage/WixRunnerResult.cs22
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
3namespace 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}