diff --git a/src/Machine.Specifications.Should/Utility/Internal/PrettyPrintingExtensions.cs b/src/Machine.Specifications.Should/Utility/Internal/PrettyPrintingExtensions.cs index 8785c1f2..abaf20f4 100644 --- a/src/Machine.Specifications.Should/Utility/Internal/PrettyPrintingExtensions.cs +++ b/src/Machine.Specifications.Should/Utility/Internal/PrettyPrintingExtensions.cs @@ -170,17 +170,17 @@ public static string EachToUsefulString(this IEnumerable enumerable) var sb = new StringBuilder(); sb.AppendLine("{"); - sb.Append(string.Join(",\r\n", array.Select(x => x.ToUsefulString().Tab()).Take(10).ToArray())); + sb.Append(string.Join($",{Environment.NewLine}", array.Select(x => x.ToUsefulString().Tab()).Take(10).ToArray())); if (array.Length > 10) { if (array.Length > 11) { - sb.AppendLine($",\r\n ...({array.Length - 10} more elements)"); + sb.AppendLine($",{Environment.NewLine} ...({array.Length - 10} more elements)"); } else { - sb.AppendLine(",\r\n" + array.Last().ToUsefulString().Tab()); + sb.AppendLine($",{Environment.NewLine}" + array.Last().ToUsefulString().Tab()); } } else @@ -214,7 +214,7 @@ internal static string ToUsefulString(this object obj) { var enumerable = items.Cast(); - return items.GetType() + ":\r\n" + enumerable.EachToUsefulString(); + return items.GetType() + $":{Environment.NewLine}" + enumerable.EachToUsefulString(); } var str = obj.ToString();