Table of Contents

Class ClassicAssert

Namespace
NUnit.Framework.Legacy
Assembly
nunit.framework.legacy.dll

The Assert class contains a collection of static methods that implement the most common assertions used in NUnit.

public abstract class ClassicAssert : Assert
Inheritance
ClassicAssert
Inherited Members

Constructors

ClassicAssert()

protected ClassicAssert()

Methods

AreEqual(double, double, double)

Verifies that two doubles are equal considering a delta. If the expected value is infinity then the delta value is ignored. Returns without throwing an exception when inside a multiple assert block.

public static void AreEqual(double expected, double actual, double delta)

Parameters

expected double

The expected value

actual double

The actual value

delta double

The maximum acceptable difference between the the expected and the actual

AreEqual(double, double, double, string, params object?[]?)

Verifies that two doubles are equal considering a delta. If the expected value is infinity then the delta value is ignored. Returns without throwing an exception when inside a multiple assert block.

public static void AreEqual(double expected, double actual, double delta, string message, params object?[]? args)

Parameters

expected double

The expected value

actual double

The actual value

delta double

The maximum acceptable difference between the the expected and the actual

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

AreEqual(object?, object?)

Verifies that two objects are equal. Two objects are considered equal if both are null, or if both have the same value. NUnit has special semantics for some object types. Returns without throwing an exception when inside a multiple assert block.

public static void AreEqual(object? expected, object? actual)

Parameters

expected object

The value that is expected

actual object

The actual value

AreEqual(object?, object?, string, params object?[]?)

Verifies that two objects are equal. Two objects are considered equal if both are null, or if both have the same value. NUnit has special semantics for some object types. Returns without throwing an exception when inside a multiple assert block.

public static void AreEqual(object? expected, object? actual, string message, params object?[]? args)

Parameters

expected object

The value that is expected

actual object

The actual value

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

AreNotEqual(object?, object?)

Verifies that two objects are not equal. Two objects are considered equal if both are null, or if both have the same value. NUnit has special semantics for some object types. Returns without throwing an exception when inside a multiple assert block.

public static void AreNotEqual(object? expected, object? actual)

Parameters

expected object

The value that is expected

actual object

The actual value

AreNotEqual(object?, object?, string, params object?[]?)

Verifies that two objects are not equal. Two objects are considered equal if both are null, or if both have the same value. NUnit has special semantics for some object types. Returns without throwing an exception when inside a multiple assert block.

public static void AreNotEqual(object? expected, object? actual, string message, params object?[]? args)

Parameters

expected object

The value that is expected

actual object

The actual value

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

AreNotSame(object?, object?)

Asserts that two objects do not refer to the same object. Returns without throwing an exception when inside a multiple assert block.

public static void AreNotSame(object? expected, object? actual)

Parameters

expected object

The expected object

actual object

The actual object

AreNotSame(object?, object?, string, params object?[]?)

Asserts that two objects do not refer to the same object. Returns without throwing an exception when inside a multiple assert block.

public static void AreNotSame(object? expected, object? actual, string message, params object?[]? args)

Parameters

expected object

The expected object

actual object

The actual object

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

AreSame(object?, object?)

Asserts that two objects refer to the same object. Returns without throwing an exception when inside a multiple assert block.

public static void AreSame(object? expected, object? actual)

Parameters

expected object

The expected object

actual object

The actual object

AreSame(object?, object?, string, params object?[]?)

Asserts that two objects refer to the same object. Returns without throwing an exception when inside a multiple assert block.

public static void AreSame(object? expected, object? actual, string message, params object?[]? args)

Parameters

expected object

The expected object

actual object

The actual object

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

AssertDoublesAreEqual(double, double, double, string, object?[]?)

Helper for Assert.AreEqual(double expected, double actual, ...) allowing code generation to work consistently.

protected static void AssertDoublesAreEqual(double expected, double actual, double delta, string message, object?[]? args)

Parameters

expected double

The expected value

actual double

The actual value

delta double

The maximum acceptable difference between the the expected and the actual

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Contains(object?, ICollection?)

Asserts that an object is contained in a collection. Returns without throwing an exception when inside a multiple assert block.

public static void Contains(object? expected, ICollection? actual)

Parameters

expected object

The expected object

actual ICollection

The collection to be examined

Contains(object?, ICollection?, string, params object?[]?)

Asserts that an object is contained in a collection. Returns without throwing an exception when inside a multiple assert block.

public static void Contains(object? expected, ICollection? actual, string message, params object?[]? args)

Parameters

expected object

The expected object

actual ICollection

The collection to be examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

False(bool)

Asserts that a condition is false. Returns without throwing an exception when inside a multiple assert block.

public static void False(bool condition)

Parameters

condition bool

The evaluated condition

False(bool, string, params object?[]?)

Asserts that a condition is false. Returns without throwing an exception when inside a multiple assert block.

public static void False(bool condition, string message, params object?[]? args)

Parameters

condition bool

The evaluated condition

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

False(bool?)

Asserts that a condition is false. Returns without throwing an exception when inside a multiple assert block.

public static void False(bool? condition)

Parameters

condition bool?

The evaluated condition

False(bool?, string, params object?[]?)

Asserts that a condition is false. Returns without throwing an exception when inside a multiple assert block.

public static void False(bool? condition, string message, params object?[]? args)

Parameters

condition bool?

The evaluated condition

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Greater(decimal, decimal)

Verifies that the first value is greater than the second value. If it is not, then an AssertionException is thrown.

public static void Greater(decimal arg1, decimal arg2)

Parameters

arg1 decimal

The first value, expected to be greater

arg2 decimal

The second value, expected to be less

Greater(decimal, decimal, string, params object[])

Verifies that the first value is greater than the second value. If it is not, then an AssertionException is thrown.

public static void Greater(decimal arg1, decimal arg2, string message, params object[] args)

Parameters

arg1 decimal

The first value, expected to be greater

arg2 decimal

The second value, expected to be less

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Greater(double, double)

Verifies that the first value is greater than the second value. If it is not, then an AssertionException is thrown.

public static void Greater(double arg1, double arg2)

Parameters

arg1 double

The first value, expected to be greater

arg2 double

The second value, expected to be less

Greater(double, double, string, params object[])

Verifies that the first value is greater than the second value. If it is not, then an AssertionException is thrown.

public static void Greater(double arg1, double arg2, string message, params object[] args)

Parameters

arg1 double

The first value, expected to be greater

arg2 double

The second value, expected to be less

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Greater(IComparable, IComparable)

Verifies that the first value is greater than the second value. If it is not, then an AssertionException is thrown.

public static void Greater(IComparable arg1, IComparable arg2)

Parameters

arg1 IComparable

The first value, expected to be greater

arg2 IComparable

The second value, expected to be less

Greater(IComparable, IComparable, string, params object[])

Verifies that the first value is greater than the second value. If it is not, then an AssertionException is thrown.

public static void Greater(IComparable arg1, IComparable arg2, string message, params object[] args)

Parameters

arg1 IComparable

The first value, expected to be greater

arg2 IComparable

The second value, expected to be less

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Greater(int, int)

Verifies that the first int is greater than the second int. If it is not, then an AssertionException is thrown.

public static void Greater(int arg1, int arg2)

Parameters

arg1 int

The first value, expected to be greater

arg2 int

The second value, expected to be less

Greater(int, int, string, params object[])

Verifies that the first int is greater than the second int. If it is not, then an AssertionException is thrown.

public static void Greater(int arg1, int arg2, string message, params object[] args)

Parameters

arg1 int

The first value, expected to be greater

arg2 int

The second value, expected to be less

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Greater(long, long)

Verifies that the first value is greater than the second value. If it is not, then an AssertionException is thrown.

public static void Greater(long arg1, long arg2)

Parameters

arg1 long

The first value, expected to be greater

arg2 long

The second value, expected to be less

Greater(long, long, string, params object[])

Verifies that the first value is greater than the second value. If it is not, then an AssertionException is thrown.

public static void Greater(long arg1, long arg2, string message, params object[] args)

Parameters

arg1 long

The first value, expected to be greater

arg2 long

The second value, expected to be less

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Greater(float, float)

Verifies that the first value is greater than the second value. If it is not, then an AssertionException is thrown.

public static void Greater(float arg1, float arg2)

Parameters

arg1 float

The first value, expected to be greater

arg2 float

The second value, expected to be less

Greater(float, float, string, params object[])

Verifies that the first value is greater than the second value. If it is not, then an AssertionException is thrown.

public static void Greater(float arg1, float arg2, string message, params object[] args)

Parameters

arg1 float

The first value, expected to be greater

arg2 float

The second value, expected to be less

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Greater(uint, uint)

Verifies that the first value is greater than the second value. If it is not, then an AssertionException is thrown.

[CLSCompliant(false)]
public static void Greater(uint arg1, uint arg2)

Parameters

arg1 uint

The first value, expected to be greater

arg2 uint

The second value, expected to be less

Greater(uint, uint, string, params object[])

Verifies that the first value is greater than the second value. If it is not, then an AssertionException is thrown.

[CLSCompliant(false)]
public static void Greater(uint arg1, uint arg2, string message, params object[] args)

Parameters

arg1 uint

The first value, expected to be greater

arg2 uint

The second value, expected to be less

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Greater(ulong, ulong)

Verifies that the first value is greater than the second value. If it is not, then an AssertionException is thrown.

[CLSCompliant(false)]
public static void Greater(ulong arg1, ulong arg2)

Parameters

arg1 ulong

The first value, expected to be greater

arg2 ulong

The second value, expected to be less

Greater(ulong, ulong, string, params object[])

Verifies that the first value is greater than the second value. If it is not, then an AssertionException is thrown.

[CLSCompliant(false)]
public static void Greater(ulong arg1, ulong arg2, string message, params object[] args)

Parameters

arg1 ulong

The first value, expected to be greater

arg2 ulong

The second value, expected to be less

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

GreaterOrEqual(decimal, decimal)

Verifies that the first value is greater than or equal to the second value. If it is not, then an AssertionException is thrown.

public static void GreaterOrEqual(decimal arg1, decimal arg2)

Parameters

arg1 decimal

The first value, expected to be greater

arg2 decimal

The second value, expected to be less

GreaterOrEqual(decimal, decimal, string, params object[])

Verifies that the first value is greater than or equal to the second value. If it is not, then an AssertionException is thrown.

public static void GreaterOrEqual(decimal arg1, decimal arg2, string message, params object[] args)

Parameters

arg1 decimal

The first value, expected to be greater

arg2 decimal

The second value, expected to be less

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

GreaterOrEqual(double, double)

Verifies that the first value is greater than or equal to the second value. If it is not, then an AssertionException is thrown.

public static void GreaterOrEqual(double arg1, double arg2)

Parameters

arg1 double

The first value, expected to be greater

arg2 double

The second value, expected to be less

GreaterOrEqual(double, double, string, params object[])

Verifies that the first value is greater than or equal to the second value. If it is not, then an AssertionException is thrown.

public static void GreaterOrEqual(double arg1, double arg2, string message, params object[] args)

Parameters

arg1 double

The first value, expected to be greater

arg2 double

The second value, expected to be less

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

GreaterOrEqual(IComparable, IComparable)

Verifies that the first value is greater than or equal to the second value. If it is not, then an AssertionException is thrown.

public static void GreaterOrEqual(IComparable arg1, IComparable arg2)

Parameters

arg1 IComparable

The first value, expected to be greater

arg2 IComparable

The second value, expected to be less

GreaterOrEqual(IComparable, IComparable, string, params object[])

Verifies that the first value is greater than or equal to the second value. If it is not, then an AssertionException is thrown.

public static void GreaterOrEqual(IComparable arg1, IComparable arg2, string message, params object[] args)

Parameters

arg1 IComparable

The first value, expected to be greater

arg2 IComparable

The second value, expected to be less

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

GreaterOrEqual(int, int)

Verifies that the first value is greater than or equal to the second value. If it is not, then an AssertionException is thrown.

public static void GreaterOrEqual(int arg1, int arg2)

Parameters

arg1 int

The first value, expected to be greater

arg2 int

The second value, expected to be less

GreaterOrEqual(int, int, string, params object[])

Verifies that the first value is greater than or equal to the second value. If it is not, then an AssertionException is thrown.

public static void GreaterOrEqual(int arg1, int arg2, string message, params object[] args)

Parameters

arg1 int

The first value, expected to be greater

arg2 int

The second value, expected to be less

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

GreaterOrEqual(long, long)

Verifies that the first value is greater than or equal to the second value. If it is not, then an AssertionException is thrown.

public static void GreaterOrEqual(long arg1, long arg2)

Parameters

arg1 long

The first value, expected to be greater

arg2 long

The second value, expected to be less

GreaterOrEqual(long, long, string, params object[])

Verifies that the first value is greater than or equal to the second value. If it is not, then an AssertionException is thrown.

public static void GreaterOrEqual(long arg1, long arg2, string message, params object[] args)

Parameters

arg1 long

The first value, expected to be greater

arg2 long

The second value, expected to be less

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

GreaterOrEqual(float, float)

Verifies that the first value is greater than or equal to the second value. If it is not, then an AssertionException is thrown.

public static void GreaterOrEqual(float arg1, float arg2)

Parameters

arg1 float

The first value, expected to be greater

arg2 float

The second value, expected to be less

GreaterOrEqual(float, float, string, params object[])

Verifies that the first value is greater than or equal to the second value. If it is not, then an AssertionException is thrown.

public static void GreaterOrEqual(float arg1, float arg2, string message, params object[] args)

Parameters

arg1 float

The first value, expected to be greater

arg2 float

The second value, expected to be less

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

GreaterOrEqual(uint, uint)

Verifies that the first value is greater than or equal to the second value. If it is not, then an AssertionException is thrown.

[CLSCompliant(false)]
public static void GreaterOrEqual(uint arg1, uint arg2)

Parameters

arg1 uint

The first value, expected to be greater

arg2 uint

The second value, expected to be less

GreaterOrEqual(uint, uint, string, params object[])

Verifies that the first value is greater than or equal to the second value. If it is not, then an AssertionException is thrown.

[CLSCompliant(false)]
public static void GreaterOrEqual(uint arg1, uint arg2, string message, params object[] args)

Parameters

arg1 uint

The first value, expected to be greater

arg2 uint

The second value, expected to be less

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

GreaterOrEqual(ulong, ulong)

Verifies that the first value is greater than or equal to the second value. If it is not, then an AssertionException is thrown.

[CLSCompliant(false)]
public static void GreaterOrEqual(ulong arg1, ulong arg2)

Parameters

arg1 ulong

The first value, expected to be greater

arg2 ulong

The second value, expected to be less

GreaterOrEqual(ulong, ulong, string, params object[])

Verifies that the first value is greater than or equal to the second value. If it is not, then an AssertionException is thrown.

[CLSCompliant(false)]
public static void GreaterOrEqual(ulong arg1, ulong arg2, string message, params object[] args)

Parameters

arg1 ulong

The first value, expected to be greater

arg2 ulong

The second value, expected to be less

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

IsAssignableFrom(Type, object?)

Asserts that an object may be assigned a value of a given Type. Returns without throwing an exception when inside a multiple assert block.

public static void IsAssignableFrom(Type expected, object? actual)

Parameters

expected Type

The expected Type.

actual object

The object under examination

IsAssignableFrom(Type, object?, string, params object?[]?)

Asserts that an object may be assigned a value of a given Type. Returns without throwing an exception when inside a multiple assert block.

public static void IsAssignableFrom(Type expected, object? actual, string message, params object?[]? args)

Parameters

expected Type

The expected Type.

actual object

The object under examination

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

IsAssignableFrom<TExpected>(object?)

Asserts that an object may be assigned a value of a given Type. Returns without throwing an exception when inside a multiple assert block.

public static void IsAssignableFrom<TExpected>(object? actual)

Parameters

actual object

The object under examination

Type Parameters

TExpected

The expected Type.

IsAssignableFrom<TExpected>(object?, string, params object?[]?)

Asserts that an object may be assigned a value of a given Type. Returns without throwing an exception when inside a multiple assert block.

public static void IsAssignableFrom<TExpected>(object? actual, string message, params object?[]? args)

Parameters

actual object

The object under examination

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Type Parameters

TExpected

The expected Type.

IsEmpty(IEnumerable)

Assert that an array, list or other collection is empty. Returns without throwing an exception when inside a multiple assert block.

public static void IsEmpty(IEnumerable collection)

Parameters

collection IEnumerable

An array, list or other collection implementing ICollection

IsEmpty(IEnumerable, string, params object?[]?)

Assert that an array, list or other collection is empty. Returns without throwing an exception when inside a multiple assert block.

public static void IsEmpty(IEnumerable collection, string message, params object?[]? args)

Parameters

collection IEnumerable

An array, list or other collection implementing ICollection

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

IsEmpty(string?)

Assert that a string is empty. Returns without throwing an exception when inside a multiple assert block.

public static void IsEmpty(string? aString)

Parameters

aString string

The string to be tested

IsEmpty(string?, string, params object?[]?)

Assert that a string is empty. Returns without throwing an exception when inside a multiple assert block.

public static void IsEmpty(string? aString, string message, params object?[]? args)

Parameters

aString string

The string to be tested

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

IsFalse(bool)

Asserts that a condition is false. Returns without throwing an exception when inside a multiple assert block.

public static void IsFalse(bool condition)

Parameters

condition bool

The evaluated condition

IsFalse(bool, string, params object?[]?)

Asserts that a condition is false. Returns without throwing an exception when inside a multiple assert block.

public static void IsFalse(bool condition, string message, params object?[]? args)

Parameters

condition bool

The evaluated condition

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

IsFalse(bool?)

Asserts that a condition is false. Returns without throwing an exception when inside a multiple assert block.

public static void IsFalse(bool? condition)

Parameters

condition bool?

The evaluated condition

IsFalse(bool?, string, params object?[]?)

Asserts that a condition is false. Returns without throwing an exception when inside a multiple assert block.

public static void IsFalse(bool? condition, string message, params object?[]? args)

Parameters

condition bool?

The evaluated condition

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

IsInstanceOf(Type, object?)

Asserts that an object is an instance of a given type. Returns without throwing an exception when inside a multiple assert block.

public static void IsInstanceOf(Type expected, object? actual)

Parameters

expected Type

The expected Type

actual object

The object being examined

IsInstanceOf(Type, object?, string, params object?[]?)

Asserts that an object is an instance of a given type. Returns without throwing an exception when inside a multiple assert block.

public static void IsInstanceOf(Type expected, object? actual, string message, params object?[]? args)

Parameters

expected Type

The expected Type

actual object

The object being examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

IsInstanceOf<TExpected>(object?)

Asserts that an object is an instance of a given type. Returns without throwing an exception when inside a multiple assert block.

public static void IsInstanceOf<TExpected>(object? actual)

Parameters

actual object

The object being examined

Type Parameters

TExpected

The expected Type

IsInstanceOf<TExpected>(object?, string, params object?[]?)

Asserts that an object is an instance of a given type. Returns without throwing an exception when inside a multiple assert block.

public static void IsInstanceOf<TExpected>(object? actual, string message, params object?[]? args)

Parameters

actual object

The object being examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Type Parameters

TExpected

The expected Type

IsNaN(double)

Verifies that the double that is passed in is an NaN value. Returns without throwing an exception when inside a multiple assert block.

public static void IsNaN(double aDouble)

Parameters

aDouble double

The value that is to be tested

IsNaN(double, string, params object?[]?)

Verifies that the double that is passed in is an NaN. Returns without throwing an exception when inside a multiple assert block.

public static void IsNaN(double aDouble, string message, params object?[]? args)

Parameters

aDouble double

The value that is to be tested

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

IsNaN(double?)

Verifies that the double that is passed in is an NaN value. Returns without throwing an exception when inside a multiple assert block.

public static void IsNaN(double? aDouble)

Parameters

aDouble double?

The value that is to be tested

IsNaN(double?, string, params object?[]?)

Verifies that the double that is passed in is an NaN value. Returns without throwing an exception when inside a multiple assert block.

public static void IsNaN(double? aDouble, string message, params object?[]? args)

Parameters

aDouble double?

The value that is to be tested

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

IsNotAssignableFrom(Type, object?)

Asserts that an object may not be assigned a value of a given Type. Returns without throwing an exception when inside a multiple assert block.

public static void IsNotAssignableFrom(Type expected, object? actual)

Parameters

expected Type

The expected Type.

actual object

The object under examination

IsNotAssignableFrom(Type, object?, string, params object?[]?)

Asserts that an object may not be assigned a value of a given Type. Returns without throwing an exception when inside a multiple assert block.

public static void IsNotAssignableFrom(Type expected, object? actual, string message, params object?[]? args)

Parameters

expected Type

The expected Type.

actual object

The object under examination

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

IsNotAssignableFrom<TExpected>(object?)

Asserts that an object may not be assigned a value of a given Type. Returns without throwing an exception when inside a multiple assert block.

public static void IsNotAssignableFrom<TExpected>(object? actual)

Parameters

actual object

The object under examination

Type Parameters

TExpected

The expected Type.

IsNotAssignableFrom<TExpected>(object?, string, params object?[]?)

Asserts that an object may not be assigned a value of a given Type. Returns without throwing an exception when inside a multiple assert block.

public static void IsNotAssignableFrom<TExpected>(object? actual, string message, params object?[]? args)

Parameters

actual object

The object under examination

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Type Parameters

TExpected

The expected Type.

IsNotEmpty(IEnumerable)

Assert that an array, list or other collection is not empty. Returns without throwing an exception when inside a multiple assert block.

public static void IsNotEmpty(IEnumerable collection)

Parameters

collection IEnumerable

An array, list or other collection implementing ICollection

IsNotEmpty(IEnumerable, string, params object?[]?)

Assert that an array, list or other collection is not empty. Returns without throwing an exception when inside a multiple assert block.

public static void IsNotEmpty(IEnumerable collection, string message, params object?[]? args)

Parameters

collection IEnumerable

An array, list or other collection implementing ICollection

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

IsNotEmpty(string?)

Assert that a string is not empty. Returns without throwing an exception when inside a multiple assert block.

public static void IsNotEmpty(string? aString)

Parameters

aString string

The string to be tested

IsNotEmpty(string?, string, params object?[]?)

Assert that a string is not empty. Returns without throwing an exception when inside a multiple assert block.

public static void IsNotEmpty(string? aString, string message, params object?[]? args)

Parameters

aString string

The string to be tested

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

IsNotInstanceOf(Type, object?)

Asserts that an object is not an instance of a given type. Returns without throwing an exception when inside a multiple assert block.

public static void IsNotInstanceOf(Type expected, object? actual)

Parameters

expected Type

The expected Type

actual object

The object being examined

IsNotInstanceOf(Type, object?, string, params object?[]?)

Asserts that an object is not an instance of a given type. Returns without throwing an exception when inside a multiple assert block.

public static void IsNotInstanceOf(Type expected, object? actual, string message, params object?[]? args)

Parameters

expected Type

The expected Type

actual object

The object being examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

IsNotInstanceOf<TExpected>(object?)

Asserts that an object is not an instance of a given type. Returns without throwing an exception when inside a multiple assert block.

public static void IsNotInstanceOf<TExpected>(object? actual)

Parameters

actual object

The object being examined

Type Parameters

TExpected

The expected Type

IsNotInstanceOf<TExpected>(object?, string, params object?[]?)

Asserts that an object is not an instance of a given type. Returns without throwing an exception when inside a multiple assert block.

public static void IsNotInstanceOf<TExpected>(object? actual, string message, params object?[]? args)

Parameters

actual object

The object being examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Type Parameters

TExpected

The expected Type

IsNotNull(object?)

Verifies that the object that is passed in is not equal to null. Returns without throwing an exception when inside a multiple assert block.

public static void IsNotNull(object? anObject)

Parameters

anObject object

The object that is to be tested

IsNotNull(object?, string, params object?[]?)

Verifies that the object that is passed in is not equal to null. Returns without throwing an exception when inside a multiple assert block.

public static void IsNotNull(object? anObject, string message, params object?[]? args)

Parameters

anObject object

The object that is to be tested

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

IsNull(object?)

Verifies that the object that is passed in is equal to null. Returns without throwing an exception when inside a multiple assert block.

public static void IsNull(object? anObject)

Parameters

anObject object

The object that is to be tested

IsNull(object?, string, params object?[]?)

Verifies that the object that is passed in is equal to null. Returns without throwing an exception when inside a multiple assert block.

public static void IsNull(object? anObject, string message, params object?[]? args)

Parameters

anObject object

The object that is to be tested

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

IsTrue(bool)

Asserts that a condition is true. Returns without throwing an exception when inside a multiple assert block.

public static void IsTrue(bool condition)

Parameters

condition bool

The evaluated condition

IsTrue(bool, string, params object?[]?)

Asserts that a condition is true. Returns without throwing an exception when inside a multiple assert block.

public static void IsTrue(bool condition, string message, params object?[]? args)

Parameters

condition bool

The evaluated condition

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

IsTrue(bool?)

Asserts that a condition is true. Returns without throwing an exception when inside a multiple assert block.

public static void IsTrue(bool? condition)

Parameters

condition bool?

The evaluated condition

IsTrue(bool?, string, params object?[]?)

Asserts that a condition is true. Returns without throwing an exception when inside a multiple assert block.

public static void IsTrue(bool? condition, string message, params object?[]? args)

Parameters

condition bool?

The evaluated condition

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Less(decimal, decimal)

Verifies that the first value is less than the second value. If it is not, then an AssertionException is thrown.

public static void Less(decimal arg1, decimal arg2)

Parameters

arg1 decimal

The first value, expected to be less

arg2 decimal

The second value, expected to be greater

Less(decimal, decimal, string, params object[])

Verifies that the first value is less than the second value. If it is not, then an AssertionException is thrown.

public static void Less(decimal arg1, decimal arg2, string message, params object[] args)

Parameters

arg1 decimal

The first value, expected to be less

arg2 decimal

The second value, expected to be greater

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Less(double, double)

Verifies that the first value is less than the second value. If it is not, then an AssertionException is thrown.

public static void Less(double arg1, double arg2)

Parameters

arg1 double

The first value, expected to be less

arg2 double

The second value, expected to be greater

Less(double, double, string, params object[])

Verifies that the first value is less than the second value. If it is not, then an AssertionException is thrown.

public static void Less(double arg1, double arg2, string message, params object[] args)

Parameters

arg1 double

The first value, expected to be less

arg2 double

The second value, expected to be greater

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Less(IComparable, IComparable)

Verifies that the first value is less than the second value. If it is not, then an AssertionException is thrown.

public static void Less(IComparable arg1, IComparable arg2)

Parameters

arg1 IComparable

The first value, expected to be less

arg2 IComparable

The second value, expected to be greater

Less(IComparable, IComparable, string, params object[])

Verifies that the first value is less than the second value. If it is not, then an AssertionException is thrown.

public static void Less(IComparable arg1, IComparable arg2, string message, params object[] args)

Parameters

arg1 IComparable

The first value, expected to be less

arg2 IComparable

The second value, expected to be greater

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Less(int, int)

Verifies that the first value is less than the second value. If it is not, then an AssertionException is thrown.

public static void Less(int arg1, int arg2)

Parameters

arg1 int

The first value, expected to be less

arg2 int

The second value, expected to be greater

Less(int, int, string, params object[])

Verifies that the first value is less than the second value. If it is not, then an AssertionException is thrown.

public static void Less(int arg1, int arg2, string message, params object[] args)

Parameters

arg1 int

The first value, expected to be less

arg2 int

The second value, expected to be greater

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Less(long, long)

Verifies that the first value is less than the second value. If it is not, then an AssertionException is thrown.

public static void Less(long arg1, long arg2)

Parameters

arg1 long

The first value, expected to be less

arg2 long

The second value, expected to be greater

Less(long, long, string, params object[])

Verifies that the first value is less than the second value. If it is not, then an AssertionException is thrown.

public static void Less(long arg1, long arg2, string message, params object[] args)

Parameters

arg1 long

The first value, expected to be less

arg2 long

The second value, expected to be greater

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Less(float, float)

Verifies that the first value is less than the second value. If it is not, then an AssertionException is thrown.

public static void Less(float arg1, float arg2)

Parameters

arg1 float

The first value, expected to be less

arg2 float

The second value, expected to be greater

Less(float, float, string, params object[])

Verifies that the first value is less than the second value. If it is not, then an AssertionException is thrown.

public static void Less(float arg1, float arg2, string message, params object[] args)

Parameters

arg1 float

The first value, expected to be less

arg2 float

The second value, expected to be greater

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Less(uint, uint)

Verifies that the first value is less than the second value. If it is not, then an AssertionException is thrown.

[CLSCompliant(false)]
public static void Less(uint arg1, uint arg2)

Parameters

arg1 uint

The first value, expected to be less

arg2 uint

The second value, expected to be greater

Less(uint, uint, string, params object[])

Verifies that the first value is less than the second value. If it is not, then an AssertionException is thrown.

[CLSCompliant(false)]
public static void Less(uint arg1, uint arg2, string message, params object[] args)

Parameters

arg1 uint

The first value, expected to be less

arg2 uint

The second value, expected to be greater

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Less(ulong, ulong)

Verifies that the first value is less than the second value. If it is not, then an AssertionException is thrown.

[CLSCompliant(false)]
public static void Less(ulong arg1, ulong arg2)

Parameters

arg1 ulong

The first value, expected to be less

arg2 ulong

The second value, expected to be greater

Less(ulong, ulong, string, params object[])

Verifies that the first value is less than the second value. If it is not, then an AssertionException is thrown.

[CLSCompliant(false)]
public static void Less(ulong arg1, ulong arg2, string message, params object[] args)

Parameters

arg1 ulong

The first value, expected to be less

arg2 ulong

The second value, expected to be greater

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

LessOrEqual(decimal, decimal)

Verifies that the first value is less than or equal to the second value. If it is not, then an AssertionException is thrown.

public static void LessOrEqual(decimal arg1, decimal arg2)

Parameters

arg1 decimal

The first value, expected to be less

arg2 decimal

The second value, expected to be greater

LessOrEqual(decimal, decimal, string, params object[])

Verifies that the first value is less than or equal to the second value. If it is not, then an AssertionException is thrown.

public static void LessOrEqual(decimal arg1, decimal arg2, string message, params object[] args)

Parameters

arg1 decimal

The first value, expected to be less

arg2 decimal

The second value, expected to be greater

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

LessOrEqual(double, double)

Verifies that the first value is less than or equal to the second value. If it is not, then an AssertionException is thrown.

public static void LessOrEqual(double arg1, double arg2)

Parameters

arg1 double

The first value, expected to be less

arg2 double

The second value, expected to be greater

LessOrEqual(double, double, string, params object[])

Verifies that the first value is less than or equal to the second value. If it is not, then an AssertionException is thrown.

public static void LessOrEqual(double arg1, double arg2, string message, params object[] args)

Parameters

arg1 double

The first value, expected to be less

arg2 double

The second value, expected to be greater

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

LessOrEqual(IComparable, IComparable)

Verifies that the first value is less than or equal to the second value. If it is not, then an AssertionException is thrown.

public static void LessOrEqual(IComparable arg1, IComparable arg2)

Parameters

arg1 IComparable

The first value, expected to be less

arg2 IComparable

The second value, expected to be greater

LessOrEqual(IComparable, IComparable, string, params object[])

Verifies that the first value is less than or equal to the second value. If it is not, then an AssertionException is thrown.

public static void LessOrEqual(IComparable arg1, IComparable arg2, string message, params object[] args)

Parameters

arg1 IComparable

The first value, expected to be less

arg2 IComparable

The second value, expected to be greater

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

LessOrEqual(int, int)

Verifies that the first value is less than or equal to the second value. If it is not, then an AssertionException is thrown.

public static void LessOrEqual(int arg1, int arg2)

Parameters

arg1 int

The first value, expected to be less

arg2 int

The second value, expected to be greater

LessOrEqual(int, int, string, params object[])

Verifies that the first value is less than or equal to the second value. If it is not, then an AssertionException is thrown.

public static void LessOrEqual(int arg1, int arg2, string message, params object[] args)

Parameters

arg1 int

The first value, expected to be less

arg2 int

The second value, expected to be greater

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

LessOrEqual(long, long)

Verifies that the first value is less than or equal to the second value. If it is not, then an AssertionException is thrown.

public static void LessOrEqual(long arg1, long arg2)

Parameters

arg1 long

The first value, expected to be less

arg2 long

The second value, expected to be greater

LessOrEqual(long, long, string, params object[])

Verifies that the first value is less than or equal to the second value. If it is not, then an AssertionException is thrown.

public static void LessOrEqual(long arg1, long arg2, string message, params object[] args)

Parameters

arg1 long

The first value, expected to be less

arg2 long

The second value, expected to be greater

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

LessOrEqual(float, float)

Verifies that the first value is less than or equal to the second value. If it is not, then an AssertionException is thrown.

public static void LessOrEqual(float arg1, float arg2)

Parameters

arg1 float

The first value, expected to be less

arg2 float

The second value, expected to be greater

LessOrEqual(float, float, string, params object[])

Verifies that the first value is less than or equal to the second value. If it is not, then an AssertionException is thrown.

public static void LessOrEqual(float arg1, float arg2, string message, params object[] args)

Parameters

arg1 float

The first value, expected to be less

arg2 float

The second value, expected to be greater

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

LessOrEqual(uint, uint)

Verifies that the first value is less than or equal to the second value. If it is not, then an AssertionException is thrown.

[CLSCompliant(false)]
public static void LessOrEqual(uint arg1, uint arg2)

Parameters

arg1 uint

The first value, expected to be less

arg2 uint

The second value, expected to be greater

LessOrEqual(uint, uint, string, params object[])

Verifies that the first value is less than or equal to the second value. If it is not, then an AssertionException is thrown.

[CLSCompliant(false)]
public static void LessOrEqual(uint arg1, uint arg2, string message, params object[] args)

Parameters

arg1 uint

The first value, expected to be less

arg2 uint

The second value, expected to be greater

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

LessOrEqual(ulong, ulong)

Verifies that the first value is less than or equal to the second value. If it is not, then an AssertionException is thrown.

[CLSCompliant(false)]
public static void LessOrEqual(ulong arg1, ulong arg2)

Parameters

arg1 ulong

The first value, expected to be less

arg2 ulong

The second value, expected to be greater

LessOrEqual(ulong, ulong, string, params object[])

Verifies that the first value is less than or equal to the second value. If it is not, then an AssertionException is thrown.

[CLSCompliant(false)]
public static void LessOrEqual(ulong arg1, ulong arg2, string message, params object[] args)

Parameters

arg1 ulong

The first value, expected to be less

arg2 ulong

The second value, expected to be greater

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Negative(decimal)

Asserts that a decimal is negative. Returns without throwing an exception when inside a multiple assert block.

public static void Negative(decimal actual)

Parameters

actual decimal

The number to be examined

Negative(decimal, string, params object?[]?)

Asserts that a decimal is negative. Returns without throwing an exception when inside a multiple assert block.

public static void Negative(decimal actual, string message, params object?[]? args)

Parameters

actual decimal

The number to be examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Negative(double)

Asserts that a double is negative. Returns without throwing an exception when inside a multiple assert block.

public static void Negative(double actual)

Parameters

actual double

The number to be examined

Negative(double, string, params object?[]?)

Asserts that a double is negative. Returns without throwing an exception when inside a multiple assert block.

public static void Negative(double actual, string message, params object?[]? args)

Parameters

actual double

The number to be examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Negative(int)

Asserts that an int is negative. Returns without throwing an exception when inside a multiple assert block.

public static void Negative(int actual)

Parameters

actual int

The number to be examined

Negative(int, string, params object?[]?)

Asserts that an int is negative. Returns without throwing an exception when inside a multiple assert block.

public static void Negative(int actual, string message, params object?[]? args)

Parameters

actual int

The number to be examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Negative(long)

Asserts that a Long is negative. Returns without throwing an exception when inside a multiple assert block.

public static void Negative(long actual)

Parameters

actual long

The number to be examined

Negative(long, string, params object?[]?)

Asserts that a Long is negative. Returns without throwing an exception when inside a multiple assert block.

public static void Negative(long actual, string message, params object?[]? args)

Parameters

actual long

The number to be examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Negative(float)

Asserts that a float is negative. Returns without throwing an exception when inside a multiple assert block.

public static void Negative(float actual)

Parameters

actual float

The number to be examined

Negative(float, string, params object?[]?)

Asserts that a float is negative. Returns without throwing an exception when inside a multiple assert block.

public static void Negative(float actual, string message, params object?[]? args)

Parameters

actual float

The number to be examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Negative(uint)

Asserts that an unsigned int is negative. Returns without throwing an exception when inside a multiple assert block.

[CLSCompliant(false)]
public static void Negative(uint actual)

Parameters

actual uint

The number to be examined

Negative(uint, string, params object?[]?)

Asserts that an unsigned int is negative. Returns without throwing an exception when inside a multiple assert block.

[CLSCompliant(false)]
public static void Negative(uint actual, string message, params object?[]? args)

Parameters

actual uint

The number to be examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Negative(ulong)

Asserts that an unsigned Long is negative. Returns without throwing an exception when inside a multiple assert block.

[CLSCompliant(false)]
public static void Negative(ulong actual)

Parameters

actual ulong

The number to be examined

Negative(ulong, string, params object?[]?)

Asserts that an unsigned Long is negative. Returns without throwing an exception when inside a multiple assert block.

[CLSCompliant(false)]
public static void Negative(ulong actual, string message, params object?[]? args)

Parameters

actual ulong

The number to be examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

NotNull(object?)

Verifies that the object that is passed in is not equal to null. Returns without throwing an exception when inside a multiple assert block.

public static void NotNull(object? anObject)

Parameters

anObject object

The object that is to be tested

NotNull(object?, string, params object?[]?)

Verifies that the object that is passed in is not equal to null. Returns without throwing an exception when inside a multiple assert block.

public static void NotNull(object? anObject, string message, params object?[]? args)

Parameters

anObject object

The object that is to be tested

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

NotZero(decimal)

Asserts that a decimal is zero. Returns without throwing an exception when inside a multiple assert block.

public static void NotZero(decimal actual)

Parameters

actual decimal

The number to be examined

NotZero(decimal, string, params object?[]?)

Asserts that a decimal is zero. Returns without throwing an exception when inside a multiple assert block.

public static void NotZero(decimal actual, string message, params object?[]? args)

Parameters

actual decimal

The number to be examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

NotZero(double)

Asserts that a double is zero. Returns without throwing an exception when inside a multiple assert block.

public static void NotZero(double actual)

Parameters

actual double

The number to be examined

NotZero(double, string, params object?[]?)

Asserts that a double is zero. Returns without throwing an exception when inside a multiple assert block.

public static void NotZero(double actual, string message, params object?[]? args)

Parameters

actual double

The number to be examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

NotZero(int)

Asserts that an int is not zero. Returns without throwing an exception when inside a multiple assert block.

public static void NotZero(int actual)

Parameters

actual int

The number to be examined

NotZero(int, string, params object?[]?)

Asserts that an int is not zero. Returns without throwing an exception when inside a multiple assert block.

public static void NotZero(int actual, string message, params object?[]? args)

Parameters

actual int

The number to be examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

NotZero(long)

Asserts that a Long is not zero. Returns without throwing an exception when inside a multiple assert block.

public static void NotZero(long actual)

Parameters

actual long

The number to be examined

NotZero(long, string, params object?[]?)

Asserts that a Long is not zero. Returns without throwing an exception when inside a multiple assert block.

public static void NotZero(long actual, string message, params object?[]? args)

Parameters

actual long

The number to be examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

NotZero(float)

Asserts that a float is zero. Returns without throwing an exception when inside a multiple assert block.

public static void NotZero(float actual)

Parameters

actual float

The number to be examined

NotZero(float, string, params object?[]?)

Asserts that a float is zero. Returns without throwing an exception when inside a multiple assert block.

public static void NotZero(float actual, string message, params object?[]? args)

Parameters

actual float

The number to be examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

NotZero(uint)

Asserts that an unsigned int is not zero. Returns without throwing an exception when inside a multiple assert block.

[CLSCompliant(false)]
public static void NotZero(uint actual)

Parameters

actual uint

The number to be examined

NotZero(uint, string, params object?[]?)

Asserts that an unsigned int is not zero. Returns without throwing an exception when inside a multiple assert block.

[CLSCompliant(false)]
public static void NotZero(uint actual, string message, params object?[]? args)

Parameters

actual uint

The number to be examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

NotZero(ulong)

Asserts that an unsigned Long is not zero. Returns without throwing an exception when inside a multiple assert block.

[CLSCompliant(false)]
public static void NotZero(ulong actual)

Parameters

actual ulong

The number to be examined

NotZero(ulong, string, params object?[]?)

Asserts that an unsigned Long is not zero. Returns without throwing an exception when inside a multiple assert block.

[CLSCompliant(false)]
public static void NotZero(ulong actual, string message, params object?[]? args)

Parameters

actual ulong

The number to be examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Null(object?)

Verifies that the object that is passed in is equal to null. Returns without throwing an exception when inside a multiple assert block.

public static void Null(object? anObject)

Parameters

anObject object

The object that is to be tested

Null(object?, string, params object?[]?)

Verifies that the object that is passed in is equal to null. Returns without throwing an exception when inside a multiple assert block.

public static void Null(object? anObject, string message, params object?[]? args)

Parameters

anObject object

The object that is to be tested

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Positive(decimal)

Asserts that a decimal is positive. Returns without throwing an exception when inside a multiple assert block.

public static void Positive(decimal actual)

Parameters

actual decimal

The number to be examined

Positive(decimal, string, params object?[]?)

Asserts that a decimal is positive. Returns without throwing an exception when inside a multiple assert block.

public static void Positive(decimal actual, string message, params object?[]? args)

Parameters

actual decimal

The number to be examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Positive(double)

Asserts that a double is positive. Returns without throwing an exception when inside a multiple assert block.

public static void Positive(double actual)

Parameters

actual double

The number to be examined

Positive(double, string, params object?[]?)

Asserts that a double is positive. Returns without throwing an exception when inside a multiple assert block.

public static void Positive(double actual, string message, params object?[]? args)

Parameters

actual double

The number to be examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Positive(int)

Asserts that an int is positive. Returns without throwing an exception when inside a multiple assert block.

public static void Positive(int actual)

Parameters

actual int

The number to be examined

Positive(int, string, params object?[]?)

Asserts that an int is positive. Returns without throwing an exception when inside a multiple assert block.

public static void Positive(int actual, string message, params object?[]? args)

Parameters

actual int

The number to be examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Positive(long)

Asserts that a Long is positive. Returns without throwing an exception when inside a multiple assert block.

public static void Positive(long actual)

Parameters

actual long

The number to be examined

Positive(long, string, params object?[]?)

Asserts that a Long is positive. Returns without throwing an exception when inside a multiple assert block.

public static void Positive(long actual, string message, params object?[]? args)

Parameters

actual long

The number to be examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Positive(float)

Asserts that a float is positive. Returns without throwing an exception when inside a multiple assert block.

public static void Positive(float actual)

Parameters

actual float

The number to be examined

Positive(float, string, params object?[]?)

Asserts that a float is positive. Returns without throwing an exception when inside a multiple assert block.

public static void Positive(float actual, string message, params object?[]? args)

Parameters

actual float

The number to be examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Positive(uint)

Asserts that an unsigned int is positive. Returns without throwing an exception when inside a multiple assert block.

[CLSCompliant(false)]
public static void Positive(uint actual)

Parameters

actual uint

The number to be examined

Positive(uint, string, params object?[]?)

Asserts that an unsigned int is positive. Returns without throwing an exception when inside a multiple assert block.

[CLSCompliant(false)]
public static void Positive(uint actual, string message, params object?[]? args)

Parameters

actual uint

The number to be examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Positive(ulong)

Asserts that an unsigned Long is positive. Returns without throwing an exception when inside a multiple assert block.

[CLSCompliant(false)]
public static void Positive(ulong actual)

Parameters

actual ulong

The number to be examined

Positive(ulong, string, params object?[]?)

Asserts that an unsigned Long is positive. Returns without throwing an exception when inside a multiple assert block.

[CLSCompliant(false)]
public static void Positive(ulong actual, string message, params object?[]? args)

Parameters

actual ulong

The number to be examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

True(bool)

Asserts that a condition is true. Returns without throwing an exception when inside a multiple assert block.

public static void True(bool condition)

Parameters

condition bool

The evaluated condition

True(bool, string, params object?[]?)

Asserts that a condition is true. Returns without throwing an exception when inside a multiple assert block.

public static void True(bool condition, string message, params object?[]? args)

Parameters

condition bool

The evaluated condition

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

True(bool?)

Asserts that a condition is true. Returns without throwing an exception when inside a multiple assert block.

public static void True(bool? condition)

Parameters

condition bool?

The evaluated condition

True(bool?, string, params object?[]?)

Asserts that a condition is true. Returns without throwing an exception when inside a multiple assert block.

public static void True(bool? condition, string message, params object?[]? args)

Parameters

condition bool?

The evaluated condition

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Zero(decimal)

Asserts that a decimal is zero. Returns without throwing an exception when inside a multiple assert block.

public static void Zero(decimal actual)

Parameters

actual decimal

The number to be examined

Zero(decimal, string, params object?[]?)

Asserts that a decimal is zero. Returns without throwing an exception when inside a multiple assert block.

public static void Zero(decimal actual, string message, params object?[]? args)

Parameters

actual decimal

The number to be examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Zero(double)

Asserts that a double is zero. Returns without throwing an exception when inside a multiple assert block.

public static void Zero(double actual)

Parameters

actual double

The number to be examined

Zero(double, string, params object?[]?)

Asserts that a double is zero. Returns without throwing an exception when inside a multiple assert block.

public static void Zero(double actual, string message, params object?[]? args)

Parameters

actual double

The number to be examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Zero(int)

Asserts that an int is zero. Returns without throwing an exception when inside a multiple assert block.

public static void Zero(int actual)

Parameters

actual int

The number to be examined

Zero(int, string, params object?[]?)

Asserts that an int is zero. Returns without throwing an exception when inside a multiple assert block.

public static void Zero(int actual, string message, params object?[]? args)

Parameters

actual int

The number to be examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Zero(long)

Asserts that a Long is zero. Returns without throwing an exception when inside a multiple assert block.

public static void Zero(long actual)

Parameters

actual long

The number to be examined

Zero(long, string, params object?[]?)

Asserts that a Long is zero. Returns without throwing an exception when inside a multiple assert block.

public static void Zero(long actual, string message, params object?[]? args)

Parameters

actual long

The number to be examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Zero(float)

Asserts that a float is zero. Returns without throwing an exception when inside a multiple assert block.

public static void Zero(float actual)

Parameters

actual float

The number to be examined

Zero(float, string, params object?[]?)

Asserts that a float is zero. Returns without throwing an exception when inside a multiple assert block.

public static void Zero(float actual, string message, params object?[]? args)

Parameters

actual float

The number to be examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Zero(uint)

Asserts that an unsigned int is zero. Returns without throwing an exception when inside a multiple assert block.

[CLSCompliant(false)]
public static void Zero(uint actual)

Parameters

actual uint

The number to be examined

Zero(uint, string, params object?[]?)

Asserts that an unsigned int is zero. Returns without throwing an exception when inside a multiple assert block.

[CLSCompliant(false)]
public static void Zero(uint actual, string message, params object?[]? args)

Parameters

actual uint

The number to be examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message

Zero(ulong)

Asserts that an unsigned Long is zero. Returns without throwing an exception when inside a multiple assert block.

[CLSCompliant(false)]
public static void Zero(ulong actual)

Parameters

actual ulong

The number to be examined

Zero(ulong, string, params object?[]?)

Asserts that an unsigned Long is zero. Returns without throwing an exception when inside a multiple assert block.

[CLSCompliant(false)]
public static void Zero(ulong actual, string message, params object?[]? args)

Parameters

actual ulong

The number to be examined

message string

The message to display in case of failure

args object[]

Array of objects to be used in formatting the message