C# Class Rubberduck.UnitTesting.AssertClass

Inheritance: IAssert
显示文件 Open project: retailcoder/Rubberduck Class Usage Examples

Public Methods

Method Description
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.

Method Details

AreEqual() public method

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.
return void

AreNotEqual() public method

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.
return void

AreNotSame() public method

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.
return void

AreSame() public method

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.
return void

Fail() public method

Fails the assertion without checking any conditions.
public Fail ( string message = null ) : void
message string An optional message to display.
return void

Inconclusive() public method

Indicates that the assertion cannot be verified.
public Inconclusive ( string message = null ) : void
message string An optional message to display.
return void

IsFalse() public method

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.
return void

IsNotNothing() public method

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.
return void

IsNothing() public method

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.
return void

IsTrue() public method

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.
return void