aboutsummaryrefslogtreecommitdiff
path: root/src/WixBuildTools.TestSupport/WixAssert.cs
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2020-07-16 16:39:27 +1000
committerSean Hall <r.sean.hall@gmail.com>2020-07-16 16:40:52 +1000
commit5f3e7559016997afed60d5003fd11548c3b24e3a (patch)
treefb1d4e261dcc9827fffe155758ca51c83269c15e /src/WixBuildTools.TestSupport/WixAssert.cs
parent0671c1c92c26bd23a422de6b8c6d8beeabb0f2db (diff)
downloadwix-5f3e7559016997afed60d5003fd11548c3b24e3a.tar.gz
wix-5f3e7559016997afed60d5003fd11548c3b24e3a.tar.bz2
wix-5f3e7559016997afed60d5003fd11548c3b24e3a.zip
Add WixAssert.AssertEqualLineByLine.
Diffstat (limited to 'src/WixBuildTools.TestSupport/WixAssert.cs')
-rw-r--r--src/WixBuildTools.TestSupport/WixAssert.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/WixBuildTools.TestSupport/WixAssert.cs b/src/WixBuildTools.TestSupport/WixAssert.cs
index 4a5c6a97..71dc6b67 100644
--- a/src/WixBuildTools.TestSupport/WixAssert.cs
+++ b/src/WixBuildTools.TestSupport/WixAssert.cs
@@ -7,6 +7,16 @@ namespace WixBuildTools.TestSupport
7 7
8 public class WixAssert : Assert 8 public class WixAssert : Assert
9 { 9 {
10 public static void AssertEqualLineByLine(string[] expectedLines, string[] actualLines)
11 {
12 for (var i = 0; i < expectedLines.Length; ++i)
13 {
14 Assert.True(actualLines.Length > i, $"{i}: expectedLines longer than actualLines");
15 Assert.Equal($"{i}: {expectedLines[i]}", $"{i}: {actualLines[i]}");
16 }
17 Assert.True(expectedLines.Length == actualLines.Length, "actualLines longer than expectedLines");
18 }
19
10 public static void Succeeded(int hr, string format, params object[] formatArgs) 20 public static void Succeeded(int hr, string format, params object[] formatArgs)
11 { 21 {
12 if (0 > hr) 22 if (0 > hr)