You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2020/11/03 21:24:22 UTC
[lucenenet] 10/11: Lucene.Net.TestFramework: Added DoesNotThrow()
overloads to Assert class
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 <sh...@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);