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.

Namespace: MbUnit.Framework
Assembly:  MbUnit.Framework (in MbUnit.Framework.dll)

Syntax

         
 C#  Visual Basic  Visual C++ 
public static void AreEqual(
	Object expected,
	Object actual,
	string format,
	Object[] args
)
Public Shared Sub AreEqual ( _
	expected As Object, _
	actual As Object, _
	format As String, _
	args As Object() _
)
public:
static void AreEqual(
	Object^ expected, 
	Object^ actual, 
	String^ format, 
	array<Object^>^ args
)

Parameters

expected
Object
The value that is expected
actual
Object
The actual value
format
String
The format of the message to display if the assertion fails, containing zero or more format items.
args
array<Object>[]()[]
An Object array containing zero or more objects to format.

Remarks

The error message is formatted using Format(String, array<Object>[]()[]).

See Also

Assert Class