FreeAndNil commented on code in PR #199:
URL: https://github.com/apache/logging-log4net/pull/199#discussion_r1816175669


##########
src/log4net.Tests/Core/LoggingEventTest.cs:
##########
@@ -138,4 +138,15 @@ static string ReviseThreadName(string? name)
     static void AssertIsCurrentThreadId(string name)
       => Assert.AreEqual(name, 
SystemInfo.CurrentThreadId.ToString(CultureInfo.InvariantCulture));
   }
+
+  [Test]
+  public void UserNameTest()
+  {
+    var expectedUserName =

Review Comment:
   ```suggestion
       string expectedUserName =
   ```
   We switched away from var-Style some time ago.



##########
src/log4net.Tests/Core/LoggingEventTest.cs:
##########
@@ -138,4 +138,15 @@ static string ReviseThreadName(string? name)
     static void AssertIsCurrentThreadId(string name)
       => Assert.AreEqual(name, 
SystemInfo.CurrentThreadId.ToString(CultureInfo.InvariantCulture));
   }
+
+  [Test]
+  public void UserNameTest()
+  {
+    var expectedUserName =
+                Environment.OSVersion.VersionString.StartsWith("Microsoft 
Windows")?
+                  $"{Environment.UserDomainName}\\{Environment.UserName}"
+                : Environment.UserName;
+    var sut = new LoggingEvent();

Review Comment:
   ```suggestion
       LoggingEvent sut = new();
   ```
   is shorter ;-)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to