diff --git a/Ical.Net.Tests/Logging/ToLogExtensions.cs b/Ical.Net.Tests/Logging/ToLogExtensions.cs index 0bb13951..39553e5d 100644 --- a/Ical.Net.Tests/Logging/ToLogExtensions.cs +++ b/Ical.Net.Tests/Logging/ToLogExtensions.cs @@ -1,4 +1,4 @@ -// +// // Copyright ical.net project maintainers and contributors. // Licensed under the MIT license. // @@ -37,14 +37,14 @@ public static string ToLog(this IEnumerable? occurrences) return "No occurrences found."; } - sb.Append(occurrenceList.Count).AppendLine(" occurrences:"); + sb.Append(occurrenceList.Count).Append(" occurrences:\n"); foreach (var occurrence in occurrenceList) { - sb.AppendLine(occurrence.ToLog()); + sb.Append(occurrence.ToLog()).Append('\n'); } - return sb.ToString().TrimEnd(Environment.NewLine.ToCharArray()); + return sb.ToString().TrimEnd('\r', '\n'); } public static string ToLog(this Occurrence occurrence) diff --git a/Ical.Net.Tests/WikiSamples/RecurrenceWikiTests.cs b/Ical.Net.Tests/WikiSamples/RecurrenceWikiTests.cs index f8a0b5b8..38edc716 100644 --- a/Ical.Net.Tests/WikiSamples/RecurrenceWikiTests.cs +++ b/Ical.Net.Tests/WikiSamples/RecurrenceWikiTests.cs @@ -1,4 +1,4 @@ -// +// // Copyright ical.net project maintainers and contributors. // Licensed under the MIT license. // @@ -638,7 +638,7 @@ private static string RemoveIrrelevantProperties(string generatedIcs, string[]? .Where(e => !e.StartsWith("DTSTAMP")) .Where(e => !(e.StartsWith("UID") && keep?.Contains("UID") != true)) .Where(e => !(e.StartsWith("SEQUENCE") && keep?.Contains("SEQUENCE") != true)) - .Aggregate(new StringBuilder(), (acc, e) => acc.AppendLine(e), e => e.ToString().TrimEnd()); + .Aggregate(new StringBuilder(), (acc, e) => acc.Append(e).Append('\n'), e => e.ToString().TrimEnd()); private static string ToWikiPeriodString(IEnumerable occurrences) => occurrences.ToLog();