Skip to content

Commit a5d59d0

Browse files
committed
Handle .NET Core AggregateException text differences
1 parent 6c82177 commit a5d59d0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

LibGit2Sharp.Tests/SetErrorFixture.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ public void FormatAggregateException()
4949
Exception exceptionToThrow = new AggregateException(aggregateExceptionMessage, new Exception(innerExceptionMessage), new Exception(innerExceptionMessage2));
5050

5151
StringBuilder sb = new StringBuilder();
52+
#if DESKTOP
5253
sb.AppendLine(aggregateExceptionMessage);
54+
#else
55+
sb.AppendLine($"{aggregateExceptionMessage} ({innerExceptionMessage}) ({innerExceptionMessage2})");
56+
#endif
5357
sb.AppendLine();
5458

5559
AppendIndentedLine(sb, expectedAggregateExceptionsHeaderText, 0);
@@ -104,7 +108,7 @@ private string IndentString(int level)
104108
return new string(' ', level * 4);
105109
}
106110

107-
#region ThrowingOdbBackend
111+
#region ThrowingOdbBackend
108112

109113
private class ThrowingOdbBackend : OdbBackend
110114
{
@@ -176,7 +180,7 @@ public override int ForEach(ForEachCallback callback)
176180
}
177181
}
178182

179-
#endregion
183+
#endregion
180184

181185
}
182186
}

0 commit comments

Comments
 (0)