Share via


Assert Members

Include Protected Members
Include Inherited Members

Verifies conditions in unit tests using true/false propositions.

The Assert type exposes the following members.

Methods

 

Name

Description

Public methodStatic member

AreEqual

Overloaded. Verifies that specified values are equal.

Public methodStatic member

AreNotEqual

Overloaded. Verifies that specified values are not equal.

Public methodStatic member

AreNotSame

Overloaded. Verifies that specified object variables refer to different objects.

Public methodStatic member

AreSame

Overloaded. Verifies that specified object variables refer to the same object.

Public methodStatic member

Equals

Do not use this method.

Public methodStatic member

Fail

Overloaded. Fails an assertion without checking any conditions.

Public methodStatic member

Inconclusive

Overloaded. Indicates that an assertion cannot be proven true or false. Also used to indicate an assertion that has not yet been implemented.

Public methodStatic member

IsFalse

Overloaded. Verifies that a specified condition is false.

Public methodStatic member

IsInstanceOfType

Overloaded. Verifies that a specified object is an instance of a specified type.

Public methodStatic member

IsNotInstanceOfType

Overloaded. Verifies that a specified object is not an instance of a specified type.

Public methodStatic member

IsNotNull

Overloaded. Verifies that a specified object is not nulla null reference (Nothing in Visual Basic).

Public methodStatic member

IsNull

Overloaded. Verifies that a specified object is null.

Public methodStatic member

IsTrue

Overloaded. Verifies that a specified condition is true.

Public methodStatic member

ReplaceNullChars

In a string, replaces null characters ('\0') with "\\0".

Top

See Also

Reference

Assert Class

Microsoft.VisualStudio.TestTools.UnitTesting Namespace