Skip to content

Commit 482d7b7

Browse files
committed
NH-3807 - Environment.NewLine isn't a good way to split log entries.
1 parent 21f3311 commit 482d7b7

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/NHibernate.Test/NHSpecificTest/Logs/LogsFixture.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public void WillGetSessionIdFromSessionLogs()
4040

4141
s.Get<Person>(1);//will execute some sql
4242

43-
var loggingEvent = spy.Events[0];
43+
var loggingEvent = spy.GetWholeLog();
4444
Assert.That(loggingEvent.Contains(sessionId.ToString()), Is.True);
4545
}
4646
}
@@ -73,12 +73,9 @@ public TextLogSpy(string loggerName, string pattern)
7373
loggerImpl.Level = Level.All;
7474
}
7575

76-
public string[] Events
76+
public string GetWholeLog()
7777
{
78-
get
79-
{
80-
return stringBuilder.ToString().Split(new[] {Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries);
81-
}
78+
return stringBuilder.ToString();
8279
}
8380

8481
public void Dispose()
@@ -89,4 +86,4 @@ public void Dispose()
8986
}
9087

9188

92-
}
89+
}

0 commit comments

Comments
 (0)