<PackageReference Include="NUnit" Version="4.2.2" />

NUnit.Framework.Assert

public abstract class Assert : AssertBase
The Assert class contains a collection of static methods that implement the most common assertions used in NUnit.
namespace NUnit.Framework { public abstract class Assert : AssertBase { public new static bool Equals(object a, object b); public new static void ReferenceEquals(object a, object b); public static void Charlie(); public static void Pass(string message); public static void Pass(); public static void Fail(string message); public static void Fail(); public static void Warn(string message); public static void Ignore(string message); public static void Ignore(); public static void Inconclusive(string message); public static void Inconclusive(); public static void Multiple(TestDelegate testDelegate); public static void Multiple(AsyncTestDelegate testDelegate); public static Task MultipleAsync(AsyncTestDelegate testDelegate); public static IDisposable EnterMultipleScope(); public static Exception ThrowsAsync(IResolveConstraint expression, AsyncTestDelegate code, string message, params object[] args); public static Exception ThrowsAsync(IResolveConstraint expression, AsyncTestDelegate code); public static Exception ThrowsAsync(Type expectedExceptionType, AsyncTestDelegate code, string message, params object[] args); public static Exception ThrowsAsync(Type expectedExceptionType, AsyncTestDelegate code); public static TActual ThrowsAsync<[System.Runtime.CompilerServices.Nullable(0)] TActual>(AsyncTestDelegate code, string message, params object[] args) where TActual : Exception; public static TActual ThrowsAsync<[System.Runtime.CompilerServices.Nullable(0)] TActual>(AsyncTestDelegate code) where TActual : Exception; public static Exception CatchAsync(AsyncTestDelegate code, string message, params object[] args); public static Exception CatchAsync(AsyncTestDelegate code); public static Exception CatchAsync(Type expectedExceptionType, AsyncTestDelegate code, string message, params object[] args); public static Exception CatchAsync(Type expectedExceptionType, AsyncTestDelegate code); public static TActual CatchAsync<[System.Runtime.CompilerServices.Nullable(0)] TActual>(AsyncTestDelegate code, string message, params object[] args) where TActual : Exception; public static TActual CatchAsync<[System.Runtime.CompilerServices.Nullable(0)] TActual>(AsyncTestDelegate code) where TActual : Exception; public static void DoesNotThrowAsync(AsyncTestDelegate code, string message, params object[] args); public static void DoesNotThrowAsync(AsyncTestDelegate code); public static Exception Throws(IResolveConstraint expression, TestDelegate code, string message, params object[] args); public static Exception Throws(IResolveConstraint expression, TestDelegate code); public static Exception Throws(Type expectedExceptionType, TestDelegate code, string message, params object[] args); public static Exception Throws(Type expectedExceptionType, TestDelegate code); public static TActual Throws<[System.Runtime.CompilerServices.Nullable(0)] TActual>(TestDelegate code, string message, params object[] args) where TActual : Exception; public static TActual Throws<[System.Runtime.CompilerServices.Nullable(0)] TActual>(TestDelegate code) where TActual : Exception; public static Exception Catch(TestDelegate code, string message, params object[] args); public static Exception Catch(TestDelegate code); public static Exception Catch(Type expectedExceptionType, TestDelegate code, string message, params object[] args); public static Exception Catch(Type expectedExceptionType, TestDelegate code); public static TActual Catch<[System.Runtime.CompilerServices.Nullable(0)] TActual>(TestDelegate code, string message, params object[] args) where TActual : Exception; public static TActual Catch<[System.Runtime.CompilerServices.Nullable(0)] TActual>(TestDelegate code) where TActual : Exception; public static void DoesNotThrow(TestDelegate code, string message, params object[] args); public static void DoesNotThrow(TestDelegate code); public static void That(bool condition, NUnitString message = default(NUnitString), string actualExpression = ""); public static void That(bool condition, FormattableString message, string actualExpression = ""); public static void That(bool condition, Func<string> getExceptionMessage, string actualExpression = ""); public static void That(Func<bool> condition, NUnitString message = default(NUnitString), string actualExpression = ""); public static void That(Func<bool> condition, FormattableString message, string actualExpression = ""); public static void That(Func<bool> condition, Func<string> getExceptionMessage, string actualExpression = ""); public static void That<[System.Runtime.CompilerServices.Nullable(2)] TActual>(ActualValueDelegate<TActual> del, IResolveConstraint expr, NUnitString message = default(NUnitString), string actualExpression = "", string constraintExpression = ""); public static void That<[System.Runtime.CompilerServices.Nullable(2)] TActual>(ActualValueDelegate<TActual> del, IResolveConstraint expr, FormattableString message, string actualExpression = "", string constraintExpression = ""); public static void That<[System.Runtime.CompilerServices.Nullable(2)] TActual>(ActualValueDelegate<TActual> del, IResolveConstraint expr, Func<string> getExceptionMessage, string actualExpression = "", string constraintExpression = ""); public static void That(TestDelegate code, IResolveConstraint constraint, NUnitString message = default(NUnitString), string actualExpression = "", string constraintExpression = ""); public static void That(TestDelegate code, IResolveConstraint constraint, FormattableString message, string actualExpression = "", string constraintExpression = ""); public static void That(TestDelegate code, IResolveConstraint constraint, Func<string> getExceptionMessage, string actualExpression = "", string constraintExpression = ""); public static void That<[System.Runtime.CompilerServices.Nullable(2)] TActual>(TActual actual, IResolveConstraint expression, NUnitString message = default(NUnitString), string actualExpression = "", string constraintExpression = ""); public static void That<[System.Runtime.CompilerServices.Nullable(2)] TActual>(TActual actual, IResolveConstraint expression, FormattableString message, string actualExpression = "", string constraintExpression = ""); public static void That<[System.Runtime.CompilerServices.Nullable(2)] TActual>(TActual actual, IResolveConstraint expression, Func<string> getExceptionMessage, string actualExpression = "", string constraintExpression = ""); public static void ByVal(object actual, IResolveConstraint expression, string message = "", string actualExpression = "", string constraintExpression = ""); public static Task ThatAsync(AsyncTestDelegate code, IResolveConstraint constraint, NUnitString message = default(NUnitString), string actualExpression = "", string constraintExpression = ""); public static Task ThatAsync(AsyncTestDelegate code, IResolveConstraint constraint, FormattableString message, string actualExpression = "", string constraintExpression = ""); public static Task ThatAsync<[System.Runtime.CompilerServices.Nullable(2)] T>(Func<Task<T>> code, IResolveConstraint constraint, NUnitString message = default(NUnitString), string actualExpression = "", string constraintExpression = ""); public static Task ThatAsync<[System.Runtime.CompilerServices.Nullable(2)] T>(Func<Task<T>> code, IResolveConstraint constraint, FormattableString message, string actualExpression = "", string constraintExpression = ""); protected Assert(); } }