Assertion class
Namespace: MbUnit.Framework
Assembly: MbUnit.Framework (in MbUnit.Framework.dll)
Syntax
| C# | Visual Basic | Visual C++ |
public sealed class Assert
Public NotInheritable Class Assert
public ref class Assert sealed
Members
| All Members | Properties | Methods |
| Member | Description | |||||||
|---|---|---|---|---|---|---|---|---|
| AreEqual(Decimal, Decimal) |
Verifies that two decimals are equal. If
they are not equals then an AssertionException is
thrown.
| |||||||
| AreEqual(Int32, Int32) |
Verifies that two ints are equal. If
they are not equals then an AssertionException is
thrown.
| |||||||
| 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. All
non-numeric types are compared by using the Equals method.
If they are not equal an AssertionException is thrown.
| |||||||
| AreEqual(Decimal, Decimal, String) |
Verifies that two decimals are equal. If
they are not equals then an AssertionException is
thrown.
| |||||||
| 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. If
they are not equals then an AssertionException is
thrown.
| |||||||
| AreEqual(Int32, Int32, String) |
Verifies that two ints are equal. If
they are not equals then an AssertionException is
thrown.
| |||||||
| AreEqual(Object, Object, String) |
Verifies that two objects are equal. Two objects are considered
equal if both are null, or if both have the same value. All
non-numeric types are compared by using the Equals method.
If they are not equal an AssertionException is thrown.
| |||||||
| AreEqual(Single, Single, Single) |
Verifies that two floats are equal considering a delta. If the
expected value is infinity then the delta value is ignored. If
they are not equals then an AssertionException is
thrown.
| |||||||
| AreEqual(Decimal, Decimal, String, array<Object>[]()[]) |
Verifies that two decimals are equal. If
they are not equals then an AssertionException is
thrown.
| |||||||
| AreEqual(Double, Double, Double, String) |
Verifies that two doubles are equal considering a delta. If the
expected value is infinity then the delta value is ignored. If
they are not equals then an AssertionException is
thrown.
| |||||||
| AreEqual(Int32, Int32, String, array<Object>[]()[]) |
Verifies that two ints are equal. If
they are not equals then an AssertionException is
thrown.
| |||||||
| AreEqual(Object, Object, String, array<Object>[]()[]) |
Verifies that two objects are equal. Two objects are considered
equal if both are null, or if both have the same value. All
non-numeric types are compared by using the Equals method.
If they are not equal an AssertionException is thrown.
| |||||||
| AreEqual(Single, Single, Single, String) |
Verifies that two floats are equal considering a delta. If the
expected value is infinity then the delta value is ignored. If
they are not equals then an AssertionException is
thrown.
| |||||||
| AreEqual(Single, Single, Single, String, array<Object>[]()[]) | ||||||||
| AreNotEqual(Decimal, Decimal) |
Asserts that two decimals are not equal. If they are equal
an AssertionException is thrown.
| |||||||
| AreNotEqual(Double, Double) |
Asserts that two doubles are not equal. If they are equal
an AssertionException is thrown.
| |||||||
| AreNotEqual(Int32, Int32) |
Asserts that two ints are not equal. If they are equal
an AssertionException is thrown.
| |||||||
| AreNotEqual(Object, Object) |
Asserts that two objects are not equal. If they are equal
an AssertionException is thrown.
| |||||||
| AreNotEqual(Single, Single) |
Asserts that two floats are not equal. If they are equal
an AssertionException is thrown.
| |||||||
| AreNotEqual(UInt32, UInt32) |
Asserts that two uints are not equal. If they are equal
an AssertionException is thrown.
| |||||||
| AreNotEqual(Decimal, Decimal, String) |
Asserts that two decimals are not equal. If they are equal
an AssertionException is thrown.
| |||||||
| AreNotEqual(Double, Double, String) |
Asserts that two doubles are not equal. If they are equal
an AssertionException is thrown.
| |||||||
| AreNotEqual(Int32, Int32, String) |
Asserts that two ints are not equal. If they are equal
an AssertionException is thrown.
| |||||||
| AreNotEqual(Object, Object, String) |
Asserts that two objects are not equal. If they are equal
an AssertionException is thrown.
| |||||||
| AreNotEqual(Single, Single, String) |
Asserts that two floats are not equal. If they are equal
an AssertionException is thrown.
| |||||||
| AreNotEqual(UInt32, UInt32, String) |
Asserts that two uints are not equal. If they are equal
an AssertionException is thrown.
| |||||||
| AreNotEqual(Decimal, Decimal, String, array<Object>[]()[]) |
Asserts that two decimals are not equal. If they are equal
an AssertionException is thrown.
| |||||||
| AreNotEqual(Double, Double, String, array<Object>[]()[]) |
Asserts that two doubles are not equal. If they are equal
an AssertionException is thrown.
| |||||||
| AreNotEqual(Int32, Int32, String, array<Object>[]()[]) |
Asserts that two ints are not equal. If they are equal
an AssertionException is thrown.
| |||||||
| AreNotEqual(Object, Object, String, array<Object>[]()[]) |
Asserts that two objects are not equal. If they are equal
an AssertionException is thrown.
| |||||||
| AreNotEqual(Single, Single, String, array<Object>[]()[]) |
Asserts that two floats are not equal. If they are equal
an AssertionException is thrown.
| |||||||
| AreNotEqual(UInt32, UInt32, String, array<Object>[]()[]) |
Asserts that two uints are not equal. If they are equal
an AssertionException is thrown.
| |||||||
| AreNotSame(Object, Object) | ||||||||
| AreNotSame(Object, Object, String) | ||||||||
| AreNotSame(Object, Object, String, array<Object>[]()[]) | ||||||||
| AreSame(Object, Object) |
Asserts that two objects refer to the same object. If they
are not the same an AssertionException is thrown.
| |||||||
| AreSame(Object, Object, String) |
Asserts that two objects refer to the same object. If they
are not the same an AssertionException is thrown.
| |||||||
| AreSame(Object, Object, String, array<Object>[]()[]) |
Asserts that two objects refer to the same object. If they
are not the same an AssertionException is thrown.
| |||||||
| AreValueEqual(PropertyInfo, Object, Object, array<Object>[]()[]) |
Verifies that the value of the property described by pi is the same
in both ojects.
| |||||||
| AssertCount | ||||||||
| Between(Byte, Byte, Byte) |
Asserts that test is between left and
right.
| |||||||
| Between(Double, Double, Double) |
Asserts that test is between left and
right.
| |||||||
| Between(IComparable, IComparable, IComparable) |
Asserts that test is between left and
right.
| |||||||
| Between(Int16, Int16, Int16) |
Asserts that test is between left and
right.
| |||||||
| Between(Int32, Int32, Int32) |
Asserts that test is between left and
right.
| |||||||
| Between(Int64, Int64, Int64) |
Asserts that test is between left and
right.
| |||||||
| Between(Single, Single, Single) |
Asserts that test is between left and
right.
| |||||||
| Between(Byte, Byte, Byte, String) |
Asserts that test is between left and
right.
| |||||||
| Between(Double, Double, Double, String) |
Asserts that test is between left and
right.
| |||||||
| Between(IComparable, IComparable, IComparable, String) |
Asserts that test is between left and
right.
| |||||||
| Between(Int16, Int16, Int16, String) |
Asserts that test is between left and
right.
| |||||||
| Between(Int32, Int32, Int32, String) |
Asserts that test is between left and
right.
| |||||||
| Between(Int64, Int64, Int64, String) |
Asserts that test is between left and
right.
| |||||||
| Between(Single, Single, Single, String) |
Asserts that test is between left and
right.
| |||||||
| Between(Byte, Byte, Byte, String, array<Object>[]()[]) |
Asserts that test is between left and
right.
| |||||||
| Between(Double, Double, Double, String, array<Object>[]()[]) |
Asserts that test is between left and
right.
| |||||||
| Between(IComparable, IComparable, IComparable, String, array<Object>[]()[]) |
Asserts that test is between left and
right.
| |||||||
| Between(Int16, Int16, Int16, String, array<Object>[]()[]) |
Asserts that test is between left and
right.
| |||||||
| Between(Int32, Int32, Int32, String, array<Object>[]()[]) |
Asserts that test is between left and
right.
| |||||||
| Between(Int64, Int64, Int64, String, array<Object>[]()[]) |
Asserts that test is between left and
right.
| |||||||
| Between(Single, Single, Single, String, array<Object>[]()[]) |
Asserts that test is between left and
right.
| |||||||
| Contains(String, String) | ||||||||
| Equals(Object) | (Inherited from Object.) | |||||||
| Equals(Object, Object) |
The Equals method throws an AssertionException. This is done
to make sure there is no mistake by calling this function.
| |||||||
| Fail()()() |
Throws an AssertionException with the message that is
passed in. This is used by the other Assert functions.
| |||||||
| Fail(String) |
Throws an AssertionException with the message that is
passed in. This is used by the other Assert functions.
| |||||||
| Fail(String, array<Object>[]()[]) |
Throws an AssertionException with the message that is
passed in. This is used by the other Assert functions.
| |||||||
| Finalize()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |||||||
| GetHashCode()()() | Serves as a hash function for a particular type. GetHashCode()()() is suitable for use in hashing algorithms and data structures like a hash table. (Inherited from Object.) | |||||||
| GetType()()() | Gets the Type of the current instance. (Inherited from Object.) | |||||||
| Greater(Decimal, Decimal) |
Verifies that the first value is greater than the second
value. If they are not, then an
AssertionException is thrown.
| |||||||
| Greater(Double, Double) |
Verifies that the first value is greater than the second
value. If they are not, then an
AssertionException is thrown.
| |||||||
| Greater(IComparable, IComparable) |
Verifies that the first value is greater than the second
value. If they are not, then an
AssertionException is thrown.
| |||||||
| Greater(Int32, Int32) |
Verifies that the first value is greater than the second
value. If they are not, then an
AssertionException is thrown.
| |||||||
| Greater(Int64, Int64) |
Verifies that the first value is greater than the second
value. If they are not, then an
AssertionException is thrown.
| |||||||
| Greater(Single, Single) |
Verifies that the first value is greater than the second
value. If they are not, then an
AssertionException is thrown.
| |||||||
| Greater(UInt32, UInt32) |
Verifies that the first value is greater than the second
value. If they are not, then an
AssertionException is thrown.
| |||||||
| Greater(Decimal, Decimal, String) |
Verifies that the first value is greater than the second
value. If they are not, then an
AssertionException is thrown.
| |||||||
| Greater(Double, Double, String) |
Verifies that the first value is greater than the second
value. If they are not, then an
AssertionException is thrown.
| |||||||
| Greater(IComparable, IComparable, String) |
Verifies that the first value is greater than the second
value. If they are not, then an
AssertionException is thrown.
| |||||||
| Greater(Int32, Int32, String) |
Verifies that the first value is greater than the second
value. If they are not, then an
AssertionException is thrown.
| |||||||
| Greater(Int64, Int64, String) |
Verifies that the first value is greater than the second
value. If they are not, then an
AssertionException is thrown.
| |||||||
| Greater(Single, Single, String) |
Verifies that the first value is greater than the second
value. If they are not, then an
AssertionException is thrown.
| |||||||
| Greater(UInt32, UInt32, String) |
Verifies that the first value is greater than the second
value. If they are not, then an
AssertionException is thrown.
| |||||||
| Greater(Decimal, Decimal, String, array<Object>[]()[]) |
Verifies that the first value is greater than the second
value. If they are not, then an
AssertionException is thrown.
| |||||||
| Greater(Double, Double, String, array<Object>[]()[]) |
Verifies that the first value is greater than the second
value. If they are not, then an
AssertionException is thrown.
| |||||||
| Greater(IComparable, IComparable, String, array<Object>[]()[]) |
Verifies that the first value is greater than the second
value. If they are not, then an
AssertionException is thrown.
| |||||||
| Greater(Int32, Int32, String, array<Object>[]()[]) |
Verifies that the first value is greater than the second
value. If they are not, then an
AssertionException is thrown.
| |||||||
| Greater(Int64, Int64, String, array<Object>[]()[]) |
Verifies that the first value is greater than the second
value. If they are not, then an
AssertionException is thrown.
| |||||||
| Greater(Single, Single, String, array<Object>[]()[]) |
Verifies that the first value is greater than the second
value. If they are not, then an
AssertionException is thrown.
| |||||||
| Greater(UInt32, UInt32, String, array<Object>[]()[]) |
Verifies that the first value is greater than the second
value. If they are not, then an
AssertionException is thrown.
| |||||||
| GreaterEqualThan(Byte, Byte) |
Verifies that left is greater than
right.
| |||||||
| GreaterEqualThan(Double, Double) |
Verifies that left is greater than
right.
| |||||||
| GreaterEqualThan(IComparable, IComparable) |
Verifies that left is strictly greater than
right.
| |||||||
| GreaterEqualThan(Int16, Int16) |
Verifies that left is greater than
right.
| |||||||
| GreaterEqualThan(Int32, Int32) |
Verifies that left is greater than
right.
| |||||||
| GreaterEqualThan(Int64, Int64) |
Verifies that left is greater than
right.
| |||||||
| GreaterEqualThan(Single, Single) |
Verifies that left is greater than
right.
| |||||||
| GreaterEqualThan(Byte, Byte, String) |
Verifies that left is greater than
right.
| |||||||
| GreaterEqualThan(Double, Double, String) |
Verifies that left is greater than
right.
| |||||||
| GreaterEqualThan(IComparable, IComparable, String) |
Verifies that left is strictly greater than
right.
| |||||||
| GreaterEqualThan(Int16, Int16, String) |
Verifies that left is greater than
right.
| |||||||
| GreaterEqualThan(Int32, Int32, String) |
Verifies that left is greater than
right.
| |||||||
| GreaterEqualThan(Int64, Int64, String) |
Verifies that left is greater than
right.
| |||||||
| GreaterEqualThan(Single, Single, String) |
Verifies that left is greater than
right.
| |||||||
| GreaterEqualThan(Byte, Byte, String, array<Object>[]()[]) |
Verifies that left is greater than
right.
| |||||||
| GreaterEqualThan(Double, Double, String, array<Object>[]()[]) |
Verifies that left is greater than
right.
| |||||||
| GreaterEqualThan(IComparable, IComparable, String, array<Object>[]()[]) |
Verifies that left is strictly greater than
right.
| |||||||
| GreaterEqualThan(Int16, Int16, String, array<Object>[]()[]) |
Verifies that left is greater than
right.
| |||||||
| GreaterEqualThan(Int32, Int32, String, array<Object>[]()[]) |
Verifies that left is greater than
right.
| |||||||
| GreaterEqualThan(Int64, Int64, String, array<Object>[]()[]) |
Verifies that left is greater than
right.
| |||||||
| GreaterEqualThan(Single, Single, String, array<Object>[]()[]) |
Verifies that left is greater than
right.
| |||||||
| GreaterThan(Byte, Byte) |
Verifies that left is strictly greater than
right.
| |||||||
| GreaterThan(Double, Double) |
Verifies that left is strictly greater than
right.
| |||||||
| GreaterThan(IComparable, IComparable) |
Verifies that left is strictly greater than
right.
| |||||||
| GreaterThan(Int16, Int16) |
Verifies that left is strictly greater than
right.
| |||||||
| GreaterThan(Int32, Int32) |
Verifies that left is strictly greater than
right.
| |||||||
| GreaterThan(Int64, Int64) |
Verifies that left is strictly greater than
right.
| |||||||
| GreaterThan(Single, Single) |
Verifies that left is strictly greater than
right.
| |||||||
| GreaterThan(Byte, Byte, String) |
Verifies that left is strictly greater than
right.
| |||||||
| GreaterThan(Double, Double, String) |
Verifies that left is strictly greater than
right.
| |||||||
| GreaterThan(IComparable, IComparable, String) |
Verifies that left is strictly greater than
right.
| |||||||
| GreaterThan(Int16, Int16, String) |
Verifies that left is strictly greater than
right.
| |||||||
| GreaterThan(Int32, Int32, String) |
Verifies that left is strictly greater than
right.
| |||||||
| GreaterThan(Int64, Int64, String) |
Verifies that left is strictly greater than
right.
| |||||||
| GreaterThan(Single, Single, String) |
Verifies that left is strictly greater than
right.
| |||||||
| GreaterThan(Byte, Byte, String, array<Object>[]()[]) |
Verifies that left is strictly greater than
right.
| |||||||
| GreaterThan(Double, Double, String, array<Object>[]()[]) |
Verifies that left is strictly greater than
right.
| |||||||
| GreaterThan(IComparable, IComparable, String, array<Object>[]()[]) |
Verifies that left is strictly greater than
right.
| |||||||
| GreaterThan(Int16, Int16, String, array<Object>[]()[]) |
Verifies that left is strictly greater than
right.
| |||||||
| GreaterThan(Int32, Int32, String, array<Object>[]()[]) |
Verifies that left is strictly greater than
right.
| |||||||
| GreaterThan(Int64, Int64, String, array<Object>[]()[]) |
Verifies that left is strictly greater than
right.
| |||||||
| GreaterThan(Single, Single, String, array<Object>[]()[]) |
Verifies that left is strictly greater than
right.
| |||||||
| Ignore(String) |
Makes the current test ignored using Format(String, array<Object>[]()[]) like
formatting
| |||||||
| Ignore(String, array<Object>[]()[]) |
Makes the current test ignored using Format(String, array<Object>[]()[]) like
formatting
| |||||||
| In(Object, IDictionary) |
Asserts that test is in the dic list.
| |||||||
| In(Object, IEnumerable) |
Asserts that test is in the enumerable collection enumerable.
| |||||||
| In(Object, IList) |
Asserts that test is in the list list.
| |||||||
| In(Object, IDictionary, String) |
Asserts that test is in the dic list.
| |||||||
| In(Object, IEnumerable, String) |
Asserts that test is in the enumerable collection enumerable.
| |||||||
| In(Object, IList, String) |
Asserts that test is in the list list.
| |||||||
| IncrementAssertCount()()() | ||||||||
| IsAssignableFrom(Type, Object) |
Asserts that an object may be assigned a value of a given Type.
| |||||||
| IsAssignableFrom(Type, Object, String) |
Asserts that an object may be assigned a value of a given Type.
| |||||||
| IsAssignableFrom(Type, Object, String, array<Object>[]()[]) |
Asserts that an object may be assigned a value of a given Type.
| |||||||
| IsEmpty(ICollection) |
Assert that an array,list or other collection is empty
| |||||||
| IsEmpty(String) |
Assert that a string is empty - that is equal to string.Emtpy
| |||||||
| IsEmpty(ICollection, String) |
Assert that an array, list or other collection is empty
| |||||||
| IsEmpty(String, String) |
Assert that a string is empty - that is equal to string.Emtpy
| |||||||
| IsEmpty(ICollection, String, array<Object>[]()[]) |
Assert that an array, list or other collection is empty
| |||||||
| IsEmpty(String, String, array<Object>[]()[]) |
Assert that a string is empty - that is equal to string.Empty
| |||||||
| IsFalse(Boolean) |
Asserts that a condition is false. If the condition is true the method throws
an AssertionException.
| |||||||
| IsFalse(Boolean, String) | ||||||||
| IsFalse(Boolean, String, array<Object>[]()[]) |
Asserts that a condition is false. If the condition is true the method throws
an AssertionException.
| |||||||
| IsInstanceOfType(Type, Object) |
Asserts that an object is an instance of a given type.
| |||||||
| IsInstanceOfType(Type, Object, String) |
Asserts that an object is an instance of a given type.
| |||||||
| IsInstanceOfType(Type, Object, String, array<Object>[]()[]) |
Asserts that an object is an instance of a given type.
| |||||||
| IsNaN(Double) |
Verifies that the double is passed is an
| |||||||
| IsNaN(Double, String) |
Verifies that the double is passed is an
| |||||||
| IsNaN(Double, String, array<Object>[]()[]) |
Verifies that the double is passed is an
| |||||||
| IsNotAssignableFrom(Type, Object) |
Asserts that an object may not be assigned a value of a given Type.
| |||||||
| IsNotAssignableFrom(Type, Object, String) |
Asserts that an object may not be assigned a value of a given Type.
| |||||||
| IsNotAssignableFrom(Type, Object, String, array<Object>[]()[]) |
Asserts that an object may not be assigned a value of a given Type.
| |||||||
| IsNotEmpty(ICollection) |
Assert that an array,list or other collection is empty
| |||||||
| IsNotEmpty(String) |
Assert that a string is empty - that is equal to string.Emtpy
| |||||||
| IsNotEmpty(ICollection, String) |
Assert that an array, list or other collection is empty
| |||||||
| IsNotEmpty(String, String) |
Assert that a string is empty - that is equal to string.Emtpy
| |||||||
| IsNotEmpty(ICollection, String, array<Object>[]()[]) |
Assert that an array, list or other collection is empty
| |||||||
| IsNotEmpty(String, String, array<Object>[]()[]) |
Assert that a string is empty - that is equal to string.Emtpy
| |||||||
| IsNotInstanceOfType(Type, Object) |
Asserts that an object is not an instance of a given type.
| |||||||
| IsNotInstanceOfType(Type, Object, String) |
Asserts that an object is not an instance of a given type.
| |||||||
| IsNotInstanceOfType(Type, Object, String, array<Object>[]()[]) |
Asserts that an object is not an instance of a given type.
| |||||||
| IsNotNull(Object) |
Verifies that the object that is passed in is not equal to
| |||||||
| IsNotNull(Object, String) |
Verifies that the object that is passed in is not equal to
| |||||||
| IsNotNull(Object, String, array<Object>[]()[]) |
Verifies that the object that is passed in is not equal to
| |||||||
| IsNull(Object) |
Verifies that the object that is passed in is equal to
| |||||||
| IsNull(Object, String) |
Verifies that the object that is passed in is equal to
| |||||||
| IsNull(Object, String, array<Object>[]()[]) |
Verifies that the object that is passed in is equal to
| |||||||
| IsTrue(Boolean) |
Asserts that a condition is true. If the condition is false the method throws
an AssertionException.
| |||||||
| IsTrue(Boolean, String) | ||||||||
| IsTrue(Boolean, String, array<Object>[]()[]) |
Asserts that a condition is true. If the condition is false the method throws
an AssertionException.
| |||||||
| Less(Decimal, Decimal) |
Verifies that the first value is less than the second
value. If it is not, then an
AssertionException is thrown.
| |||||||
| Less(Double, Double) |
Verifies that the first value is less than the second
value. If it is not, then an
AssertionException is thrown.
| |||||||
| Less(IComparable, IComparable) |
Verifies that the first value is less than the second
value. If it is not, then an
AssertionException is thrown.
| |||||||
| Less(Int32, Int32) |
Verifies that the first value is less than the second
value. If it is not, then an
AssertionException is thrown.
| |||||||
| Less(Int64, Int64) |
Verifies that the first value is less than the second
value. If it is not, then an
AssertionException is thrown.
| |||||||
| Less(Single, Single) |
Verifies that the first value is less than the second
value. If it is not, then an
AssertionException is thrown.
| |||||||
| Less(UInt32, UInt32) |
Verifies that the first value is less than the second
value. If it is not, then an
AssertionException is thrown.
| |||||||
| Less(Decimal, Decimal, String) |
Verifies that the first value is less than the second
value. If it is not, then an
AssertionException is thrown.
| |||||||
| Less(Double, Double, String) |
Verifies that the first value is less than the second
value. If it is not, then an
AssertionException is thrown.
| |||||||
| Less(IComparable, IComparable, String) |
Verifies that the first value is less than the second
value. If it is not, then an
AssertionException is thrown.
| |||||||
| Less(Int32, Int32, String) |
Verifies that the first value is less than the second
value. If it is not, then an
AssertionException is thrown.
| |||||||
| Less(Int64, Int64, String) |
Verifies that the first value is less than the second
value. If it is not, then an
AssertionException is thrown.
| |||||||
| Less(Single, Single, String) | ||||||||