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: [email protected]

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

Reply via email to