FsUnit


Assert Type

Generic test assertions.

Static members

Static member Description

Assert.AreEqual(expected, actual, message, args)

Full Usage: Assert.AreEqual(expected, actual, message, args)

Parameters:
    expected : 'T - The expected value.
    actual : 'T - The actual value.
    message : string - The message to display in case of failure.
    args : obj[] - Array of objects to be used in formatting the message.

Verifies that two values are equal. If they are not, then an NUnit.Framework.AssertException is thrown.

expected : 'T

The expected value.

actual : 'T

The actual value.

message : string

The message to display in case of failure.

args : obj[]

Array of objects to be used in formatting the message.

Assert.AreEqual(expected, actual, message)

Full Usage: Assert.AreEqual(expected, actual, message)

Parameters:
    expected : 'T - The expected value.
    actual : 'T - The actual value.
    message : string - The message to display in case of failure.

Verifies that two values are equal. If they are not, then an NUnit.Framework.AssertException is thrown.

expected : 'T

The expected value.

actual : 'T

The actual value.

message : string

The message to display in case of failure.

Assert.AreEqual(expected, actual)

Full Usage: Assert.AreEqual(expected, actual)

Parameters:
    expected : 'T - The expected value.
    actual : 'T - The actual value.

Verifies that two values are equal. If they are not, then an NUnit.Framework.AssertException is thrown.

expected : 'T

The expected value.

actual : 'T

The actual value.

Assert.AreNotEqual(expected, actual, message, args)

Full Usage: Assert.AreNotEqual(expected, actual, message, args)

Parameters:
    expected : 'T - The expected value.
    actual : 'T - The actual value.
    message : string - The message to display in case of failure.
    args : obj[] - Array of objects to be used in formatting the message.

Verifies that two values are not equal. If they are, then an NUnit.Framework.AssertException is thrown.

expected : 'T

The expected value.

actual : 'T

The actual value.

message : string

The message to display in case of failure.

args : obj[]

Array of objects to be used in formatting the message.

Assert.AreNotEqual(expected, actual, message)

Full Usage: Assert.AreNotEqual(expected, actual, message)

Parameters:
    expected : 'T - The expected value.
    actual : 'T - The actual value.
    message : string - The message to display in case of failure.

Verifies that two values are not equal. If they are, then an NUnit.Framework.AssertException is thrown.

expected : 'T

The expected value.

actual : 'T

The actual value.

message : string

The message to display in case of failure.

Assert.AreNotEqual(expected, actual)

Full Usage: Assert.AreNotEqual(expected, actual)

Parameters:
    expected : 'T - The expected value.
    actual : 'T - The actual value.

Verifies that two values are not equal. If they are, then an NUnit.Framework.AssertException is thrown.

expected : 'T

The expected value.

actual : 'T

The actual value.

Assert.AreNotSame(expected, actual, message, args)

Full Usage: Assert.AreNotSame(expected, actual, message, args)

Parameters:
    expected : 'T - The expected object.
    actual : 'T - The actual object.
    message : string - The message to display in case of failure.
    args : obj[] - Array of objects to be used in formatting the message.

Asserts that two objects do not refer to the same object. If they are not, then an NUnit.Framework.AssertException is thrown.

expected : 'T

The expected object.

actual : 'T

The actual object.

message : string

The message to display in case of failure.

args : obj[]

Array of objects to be used in formatting the message.

Assert.AreNotSame(expected, actual, message)

Full Usage: Assert.AreNotSame(expected, actual, message)

Parameters:
    expected : 'T - The expected object.
    actual : 'T - The actual object.
    message : string - The message to display in case of failure.

Asserts that two objects do not refer to the same object. If they are not, then an NUnit.Framework.AssertException is thrown.

expected : 'T

The expected object.

actual : 'T

The actual object.

message : string

The message to display in case of failure.

Assert.AreNotSame(expected, actual)

Full Usage: Assert.AreNotSame(expected, actual)

Parameters:
    expected : 'T - The expected object.
    actual : 'T - The actual object.

Asserts that two objects do not refer to the same object. If they are not, then an NUnit.Framework.AssertException is thrown.

expected : 'T

The expected object.

actual : 'T

The actual object.

Assert.AreSame(expected, actual, message, args)

Full Usage: Assert.AreSame(expected, actual, message, args)

Parameters:
    expected : 'T - The expected object.
    actual : 'T - The actual object.
    message : string - The message to display in case of failure.
    args : obj[] - Array of objects to be used in formatting the message.

Asserts that two objects refer to the same object. If they are not, then an NUnit.Framework.AssertException is thrown.

expected : 'T

The expected object.

actual : 'T

The actual object.

message : string

The message to display in case of failure.

args : obj[]

Array of objects to be used in formatting the message.

Assert.AreSame(expected, actual, message)

Full Usage: Assert.AreSame(expected, actual, message)

Parameters:
    expected : 'T - The expected object.
    actual : 'T - The actual object.
    message : string - The message to display in case of failure.

Asserts that two objects refer to the same object. If they are not, then an NUnit.Framework.AssertException is thrown.

expected : 'T

The expected object.

actual : 'T

The actual object.

message : string

The message to display in case of failure.

Assert.AreSame(expected, actual)

Full Usage: Assert.AreSame(expected, actual)

Parameters:
    expected : 'T - The expected object.
    actual : 'T - The actual object.

Asserts that two objects refer to the same object. If they are not, then an NUnit.Framework.AssertException is thrown.

expected : 'T

The expected object.

actual : 'T

The actual object.

Assert.Contains(expected, actual, message, args)

Full Usage: Assert.Contains(expected, actual, message, args)

Parameters:
    expected : 'T - The expected object.
    actual : IEnumerable<'T> - The list to be examined.
    message : string - The message to display in case of failure.
    args : obj[] - Array of objects to be used in formatting the message.

Asserts that an object is contained in a list.

expected : 'T

The expected object.

actual : IEnumerable<'T>

The list to be examined.

message : string

The message to display in case of failure.

args : obj[]

Array of objects to be used in formatting the message.

Assert.Contains(expected, actual, message)

Full Usage: Assert.Contains(expected, actual, message)

Parameters:
    expected : 'T - The expected object.
    actual : IEnumerable<'T> - The list to be examined.
    message : string - The message to display in case of failure.

Asserts that an object is contained in a list.

expected : 'T

The expected object.

actual : IEnumerable<'T>

The list to be examined.

message : string

The message to display in case of failure.

Assert.Contains(expected, actual)

Full Usage: Assert.Contains(expected, actual)

Parameters:
    expected : 'T - The expected object.
    actual : IEnumerable<'T> - The list to be examined.

Asserts that an object is contained in a list.

expected : 'T

The expected object.

actual : IEnumerable<'T>

The list to be examined.

Assert.Greater(arg1, arg2, message, args)

Full Usage: Assert.Greater(arg1, arg2, message, args)

Parameters:
    arg1 : 'T - The first value, expected to be greater.
    arg2 : 'T - The second value, expected to be less.
    message : string - The message to display in case of failure.
    args : obj[] - Array of objects to be used in formatting the message.

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

arg1 : 'T

The first value, expected to be greater.

arg2 : 'T

The second value, expected to be less.

message : string

The message to display in case of failure.

args : obj[]

Array of objects to be used in formatting the message.

Assert.Greater(arg1, arg2, message)

Full Usage: Assert.Greater(arg1, arg2, message)

Parameters:
    arg1 : 'T - The first value, expected to be greater.
    arg2 : 'T - The second value, expected to be less.
    message : string - The message to display in case of failure.

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

arg1 : 'T

The first value, expected to be greater.

arg2 : 'T

The second value, expected to be less.

message : string

The message to display in case of failure.

Assert.Greater(arg1, arg2)

Full Usage: Assert.Greater(arg1, arg2)

Parameters:
    arg1 : 'T - The first value, expected to be greater.
    arg2 : 'T - The second value, expected to be less.

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

arg1 : 'T

The first value, expected to be greater.

arg2 : 'T

The second value, expected to be less.

Assert.GreaterOrEqual(arg1, arg2, message, args)

Full Usage: Assert.GreaterOrEqual(arg1, arg2, message, args)

Parameters:
    arg1 : 'T - The first value, expected to be greater.
    arg2 : 'T - The second value, expected to be less.
    message : string - The message to display in case of failure.
    args : obj[] - Array of objects to be used in formatting the message.

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

arg1 : 'T

The first value, expected to be greater.

arg2 : 'T

The second value, expected to be less.

message : string

The message to display in case of failure.

args : obj[]

Array of objects to be used in formatting the message.

Assert.GreaterOrEqual(arg1, arg2, message)

Full Usage: Assert.GreaterOrEqual(arg1, arg2, message)

Parameters:
    arg1 : 'T - The first value, expected to be greater.
    arg2 : 'T - The second value, expected to be less.
    message : string - The message to display in case of failure.

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

arg1 : 'T

The first value, expected to be greater.

arg2 : 'T

The second value, expected to be less.

message : string

The message to display in case of failure.

Assert.GreaterOrEqual(arg1, arg2)

Full Usage: Assert.GreaterOrEqual(arg1, arg2)

Parameters:
    arg1 : 'T - The first value, expected to be greater.
    arg2 : 'T - The second value, expected to be less.

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

arg1 : 'T

The first value, expected to be greater.

arg2 : 'T

The second value, expected to be less.

Assert.Less(arg1, arg2, message, args)

Full Usage: Assert.Less(arg1, arg2, message, args)

Parameters:
    arg1 : 'T - The first value, expected to be less.
    arg2 : 'T - The second value, expected to be greater.
    message : string - The message to display in case of failure.
    args : obj[] - Array of objects to be used in formatting the message.

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

arg1 : 'T

The first value, expected to be less.

arg2 : 'T

The second value, expected to be greater.

message : string

The message to display in case of failure.

args : obj[]

Array of objects to be used in formatting the message.

Assert.Less(arg1, arg2, message)

Full Usage: Assert.Less(arg1, arg2, message)

Parameters:
    arg1 : 'T - The first value, expected to be less.
    arg2 : 'T - The second value, expected to be greater.
    message : string - The message to display in case of failure.

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

arg1 : 'T

The first value, expected to be less.

arg2 : 'T

The second value, expected to be greater.

message : string

The message to display in case of failure.

Assert.Less(arg1, arg2)

Full Usage: Assert.Less(arg1, arg2)

Parameters:
    arg1 : 'T - The first value, expected to be less.
    arg2 : 'T - The second value, expected to be greater.

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

arg1 : 'T

The first value, expected to be less.

arg2 : 'T

The second value, expected to be greater.

Assert.LessOrEqual(arg1, arg2, message, args)

Full Usage: Assert.LessOrEqual(arg1, arg2, message, args)

Parameters:
    arg1 : 'T - The first value, expected to be less.
    arg2 : 'T - The second value, expected to be greater.
    message : string - The message to display in case of failure.
    args : obj[] - Array of objects to be used in formatting the message.

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

arg1 : 'T

The first value, expected to be less.

arg2 : 'T

The second value, expected to be greater.

message : string

The message to display in case of failure.

args : obj[]

Array of objects to be used in formatting the message.

Assert.LessOrEqual(arg1, arg2, message)

Full Usage: Assert.LessOrEqual(arg1, arg2, message)

Parameters:
    arg1 : 'T - The first value, expected to be less.
    arg2 : 'T - The second value, expected to be greater.
    message : string - The message to display in case of failure.

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

arg1 : 'T

The first value, expected to be less.

arg2 : 'T

The second value, expected to be greater.

message : string

The message to display in case of failure.

Assert.LessOrEqual(arg1, arg2)

Full Usage: Assert.LessOrEqual(arg1, arg2)

Parameters:
    arg1 : 'T - The first value, expected to be less.
    arg2 : 'T - The second value, expected to be greater.

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

arg1 : 'T

The first value, expected to be less.

arg2 : 'T

The second value, expected to be greater.

Assert.NotNull(arg, message, args)

Full Usage: Assert.NotNull(arg, message, args)

Parameters:
    arg : 'T - The object that is to be tested.
    message : string - The message to display in case of failure.
    args : obj[] - Array of objects to be used in formatting the message.

Verifies that the object that is passed in is not equal to 'null'. If the object is 'null', then an NUnit.Framework.AssertException is thrown.

arg : 'T

The object that is to be tested.

message : string

The message to display in case of failure.

args : obj[]

Array of objects to be used in formatting the message.

Assert.NotNull(arg, message)

Full Usage: Assert.NotNull(arg, message)

Parameters:
    arg : 'T - The object that is to be tested.
    message : string - The message to display in case of failure.

Verifies that the object that is passed in is not equal to 'null'. If the object is 'null', then an NUnit.Framework.AssertException is thrown.

arg : 'T

The object that is to be tested.

message : string

The message to display in case of failure.

Assert.NotNull(arg)

Full Usage: Assert.NotNull(arg)

Parameters:
    arg : 'T - The object that is to be tested.

Verifies that the object that is passed in is not equal to 'null'. If the object is 'null', then an NUnit.Framework.AssertException is thrown.

arg : 'T

The object that is to be tested.

Assert.Null(arg, message, args)

Full Usage: Assert.Null(arg, message, args)

Parameters:
    arg : 'T - The object that is to be tested.
    message : string - The message to display in case of failure.
    args : obj[] - Array of objects to be used in formatting the message.

Verifies that the object that is passed in is equal to 'null'. If the object is not 'null', then an NUnit.Framework.AssertException is thrown.

arg : 'T

The object that is to be tested.

message : string

The message to display in case of failure.

args : obj[]

Array of objects to be used in formatting the message.

Assert.Null(arg, message)

Full Usage: Assert.Null(arg, message)

Parameters:
    arg : 'T - The object that is to be tested.
    message : string - The message to display in case of failure.

Verifies that the object that is passed in is equal to 'null'. If the object is not 'null', then an NUnit.Framework.AssertException is thrown.

arg : 'T

The object that is to be tested.

message : string

The message to display in case of failure.

Assert.Null(arg)

Full Usage: Assert.Null(arg)

Parameters:
    arg : 'T - The object that is to be tested.

Verifies that the object that is passed in is equal to 'null'. If the object is not 'null', then an NUnit.Framework.AssertException is thrown.

arg : 'T

The object that is to be tested.

Fork me on GitHub