C# Класс Rubberduck.UnitTesting.AssertClass

Наследование: IAssert
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AreEqual ( object expected, object actual, string message = null ) : void

Verifies that two specified objects are equal. The assertion fails if the objects are not equal.

expected and actual must be the same type.

AreNotEqual ( object expected, object actual, string message = null ) : void

Verifies that two specified objects are not equal. The assertion fails if the objects are equal.

expected and actual must be the same type.

AreNotSame ( object expected, object actual, string message = null ) : void

Verifies that two specified object variables refer to different objects. The assertion fails if they refer to the same object.

AreSame ( object expected, object actual, string message = null ) : void

Verifies that two specified object variables refer to the same object. The assertion fails if they refer to different objects.

Fail ( string message = null ) : void

Fails the assertion without checking any conditions.

Inconclusive ( string message = null ) : void

Indicates that the assertion cannot be verified.

IsFalse ( bool condition, string message = null ) : void

Verifies that the specified condition is false. The assertion fails if the condition is true.

IsNotNothing ( object value, string message = null ) : void

Verifies that the specified object is not Nothing. The assertion fails if it is Nothing.

IsNothing ( object value, string message = null ) : void

Verifies that the specified object is Nothing. The assertion fails if it is not Nothing.

IsTrue ( bool condition, string message = null ) : void

Verifies that the specified condition is true. The assertion fails if the condition is false.

Описание методов

AreEqual() публичный Метод

Verifies that two specified objects are equal. The assertion fails if the objects are not equal.
expected and actual must be the same type.
public AreEqual ( object expected, object actual, string message = null ) : void
expected object The expected value.
actual object The actual value.
message string An optional message to display if the assertion fails.
Результат void

AreNotEqual() публичный Метод

Verifies that two specified objects are not equal. The assertion fails if the objects are equal.
expected and actual must be the same type.
public AreNotEqual ( object expected, object actual, string message = null ) : void
expected object The expected value.
actual object The actual value.
message string An optional message to display if the assertion fails.
Результат void

AreNotSame() публичный Метод

Verifies that two specified object variables refer to different objects. The assertion fails if they refer to the same object.
public AreNotSame ( object expected, object actual, string message = null ) : void
expected object The expected reference.
actual object The actual reference.
message string An optional message to display if the assertion fails.
Результат void

AreSame() публичный Метод

Verifies that two specified object variables refer to the same object. The assertion fails if they refer to different objects.
public AreSame ( object expected, object actual, string message = null ) : void
expected object The expected reference.
actual object The actual reference.
message string An optional message to display if the assertion fails.
Результат void

Fail() публичный Метод

Fails the assertion without checking any conditions.
public Fail ( string message = null ) : void
message string An optional message to display.
Результат void

Inconclusive() публичный Метод

Indicates that the assertion cannot be verified.
public Inconclusive ( string message = null ) : void
message string An optional message to display.
Результат void

IsFalse() публичный Метод

Verifies that the specified condition is false. The assertion fails if the condition is true.
public IsFalse ( bool condition, string message = null ) : void
condition bool Any Boolean value or expression.
message string An optional message to display if the assertion fails.
Результат void

IsNotNothing() публичный Метод

Verifies that the specified object is not Nothing. The assertion fails if it is Nothing.
public IsNotNothing ( object value, string message = null ) : void
value object The object to verify.
message string An optional message to display if the assertion fails.
Результат void

IsNothing() публичный Метод

Verifies that the specified object is Nothing. The assertion fails if it is not Nothing.
public IsNothing ( object value, string message = null ) : void
value object The object to verify.
message string An optional message to display if the assertion fails.
Результат void

IsTrue() публичный Метод

Verifies that the specified condition is true. The assertion fails if the condition is false.
public IsTrue ( bool condition, string message = null ) : void
condition bool Any Boolean value or expression.
message string An optional message to display if the assertion fails.
Результат void