lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [lucenenet] 10/11: Lucene.Net.TestFramework: Added DoesNotThrow() overloads to Assert class
Date Tue, 03 Nov 2020 21:24:22 GMT
This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit 13f381b3bef87569c0a35fd1387cce019380d52f
Author: Shad Storhaug <shad@shadstorhaug.com>
AuthorDate: Wed Nov 4 02:05:45 2020 +0700

    Lucene.Net.TestFramework: Added DoesNotThrow() overloads to Assert class
---
 .../Support/TestFramework/Assert.cs                            | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/Lucene.Net.TestFramework.NUnit/Support/TestFramework/Assert.cs b/src/Lucene.Net.TestFramework.NUnit/Support/TestFramework/Assert.cs
index 377bca2..882d399 100644
--- a/src/Lucene.Net.TestFramework.NUnit/Support/TestFramework/Assert.cs
+++ b/src/Lucene.Net.TestFramework.NUnit/Support/TestFramework/Assert.cs
@@ -974,6 +974,16 @@ namespace Lucene.Net.TestFramework
                 _NUnit.Assert.Greater(arg1, arg2);
         }
 
+        public static void DoesNotThrow(Action action, string message, params object[] args)
+        {
+            _NUnit.Assert.DoesNotThrow(() => action(), message, args);
+        }
+
+        public static void DoesNotThrow(Action action)
+        {
+            _NUnit.Assert.DoesNotThrow(() => action());
+        }
+
         public static Exception Throws<TException>(Action action, string message, params
object[] args)
         {
             return Throws(typeof(TException), action, message, args);


Mime
View raw message