You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "FreeAndNil (via GitHub)" <gi...@apache.org> on 2024/10/22 09:41:23 UTC

[PR] bumped NUnit to 4.2.2 (logging-log4net)

FreeAndNil opened a new pull request, #200:
URL: https://github.com/apache/logging-log4net/pull/200

   - added NUnit.Analyzers before moving to NUnit 4
   - switched to NUnit 4.2.2


-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] bumped NUnit to 4.2.2 (logging-log4net)

Posted by "FreeAndNil (via GitHub)" <gi...@apache.org>.
FreeAndNil commented on code in PR #200:
URL: https://github.com/apache/logging-log4net/pull/200#discussion_r1810482416


##########
src/log4net.Tests/Util/CyclicBufferTest.cs:
##########
@@ -33,49 +33,47 @@ namespace log4net.Tests.Util;
 public class CyclicBufferTest
 {
   [Test]
-  public void TestConstructorSize0()
-  {
-    Assert.Throws<ArgumentOutOfRangeException>(() => new CyclicBuffer(0));
-  }
+  public void TestConstructorSize0() 
+    => Assert.Throws<ArgumentOutOfRangeException>(() => new CyclicBuffer(0));

Review Comment:
   Thanks for the hint. I've adjusted the tests.



-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] bumped NUnit to 4.2.2 (logging-log4net)

Posted by "FreeAndNil (via GitHub)" <gi...@apache.org>.
FreeAndNil merged PR #200:
URL: https://github.com/apache/logging-log4net/pull/200


-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] bumped NUnit to 4.2.2 (logging-log4net)

Posted by "fluffynuts (via GitHub)" <gi...@apache.org>.
fluffynuts commented on code in PR #200:
URL: https://github.com/apache/logging-log4net/pull/200#discussion_r1810402961


##########
src/log4net.Tests/Util/CyclicBufferTest.cs:
##########
@@ -33,49 +33,47 @@ namespace log4net.Tests.Util;
 public class CyclicBufferTest
 {
   [Test]
-  public void TestConstructorSize0()
-  {
-    Assert.Throws<ArgumentOutOfRangeException>(() => new CyclicBuffer(0));
-  }
+  public void TestConstructorSize0() 
+    => Assert.Throws<ArgumentOutOfRangeException>(() => new CyclicBuffer(0));

Review Comment:
   I know that a lot of the Assert.* assertions were removed in favor of using `Assert.That` - there's an `Assert.That` for verifying that things do or don't throw as well, eg:
   
   ```csharp
               Assert.That(
                   () => throw new InvalidOperationException("123"),
                   Throws.Exception.InstanceOf<InvalidOperationException>()
                       .With.Message.EqualTo("123")
               );
   ```
   
   it seems like `Assert.Throws` is still valid, but I wonder for how long?



-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org