C# Class Rubberduck.UnitTesting.AssertClass

Inheritance: IAssert
Afficher le fichier Open project: retailcoder/Rubberduck Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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.
Résultat void

AreNotEqual() public méthode

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.
Résultat void

AreNotSame() public méthode

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.
Résultat void

AreSame() public méthode

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.
Résultat void

Fail() public méthode

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

Inconclusive() public méthode

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

IsFalse() public méthode

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.
Résultat void

IsNotNothing() public méthode

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.
Résultat void

IsNothing() public méthode

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.
Résultat void

IsTrue() public méthode

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.
Résultat void