C# Class Microsoft.WindowsAzure.MobileServices.TestFramework.Assert

Assertions that will throw InvalidOperationExceptions when their conditions have not been met.
Afficher le fichier Open project: Azure/azure-mobile-apps-net-client

Méthodes publiques

Méthode Description
AreEqual ( object a, object b ) : void

Assert that two values are equal.

AreEqual ( object a, object b, string message ) : void

Assert that two values are equal.

AreEquivalent ( IEnumerable a, IEnumerable b ) : void
AreEquivalent ( IEnumerable a, IEnumerable b, string message ) : void
AreNotEqual ( object a, object b ) : void

Assert that two values are not equal.

AreNotEqual ( object a, object b, string message ) : void

Assert that two values are not equal.

AreSame ( object a, object b ) : void

Assert that two values are the same.

AreSame ( object a, object b, string message ) : void

Assert that two values are the same.

Contains ( string text, string substring ) : void

Assert that a substring is present in the text.

Contains ( string text, string substring, string message ) : void

Assert that a substring is present in the text.

EndsWith ( string text, string substring ) : void

Assert that a string ends with another.

EndsWith ( string text, string substring, string message ) : void

Assert that a string ends with another.

Fail ( string message ) : void

Force a failure.

IsFalse ( bool condition ) : void

Assert that a condition is false.

IsFalse ( bool condition, string message ) : void

Assert that a condition is false.

IsNotNull ( object value ) : void
IsNotNull ( object value, string message ) : void
IsNull ( object value ) : void
IsNull ( object value, string message ) : void
IsTrue ( bool condition ) : void

Assert that a condition is true.

IsTrue ( bool condition, string message ) : void

Assert that a condition is true.

StartsWith ( string text, string substring ) : void

Assert that a string starts with another.

StartsWith ( string text, string substring, string message ) : void

Assert that a string starts with another.

Private Methods

Méthode Description
GetProperties ( object obj ) : string

Method Details

AreEqual() public static méthode

Assert that two values are equal.
public static AreEqual ( object a, object b ) : void
a object The first value.
b object The second value.
Résultat void

AreEqual() public static méthode

Assert that two values are equal.
public static AreEqual ( object a, object b, string message ) : void
a object The first value.
b object The second value.
message string Details about the assertion.
Résultat void

AreEquivalent() public static méthode

public static AreEquivalent ( IEnumerable a, IEnumerable b ) : void
a IEnumerable
b IEnumerable
Résultat void

AreEquivalent() public static méthode

public static AreEquivalent ( IEnumerable a, IEnumerable b, string message ) : void
a IEnumerable
b IEnumerable
message string
Résultat void

AreNotEqual() public static méthode

Assert that two values are not equal.
public static AreNotEqual ( object a, object b ) : void
a object The first value.
b object The second value.
Résultat void

AreNotEqual() public static méthode

Assert that two values are not equal.
public static AreNotEqual ( object a, object b, string message ) : void
a object The first value.
b object The second value.
message string Details about the assertion.
Résultat void

AreSame() public static méthode

Assert that two values are the same.
public static AreSame ( object a, object b ) : void
a object The first value.
b object The second value.
Résultat void

AreSame() public static méthode

Assert that two values are the same.
public static AreSame ( object a, object b, string message ) : void
a object The first value.
b object The second value.
message string Details about the assertion.
Résultat void

Contains() public static méthode

Assert that a substring is present in the text.
public static Contains ( string text, string substring ) : void
text string The text to search.
substring string The substring to find.
Résultat void

Contains() public static méthode

Assert that a substring is present in the text.
public static Contains ( string text, string substring, string message ) : void
text string The text to search.
substring string The substring to find.
message string Details about the assertion.
Résultat void

EndsWith() public static méthode

Assert that a string ends with another.
public static EndsWith ( string text, string substring ) : void
text string The text to search.
substring string The substring to find.
Résultat void

EndsWith() public static méthode

Assert that a string ends with another.
public static EndsWith ( string text, string substring, string message ) : void
text string The text to search.
substring string The substring to find.
message string Details about the assertion.
Résultat void

Fail() public static méthode

Force a failure.
public static Fail ( string message ) : void
message string Details about the assertion.
Résultat void

IsFalse() public static méthode

Assert that a condition is false.
public static IsFalse ( bool condition ) : void
condition bool The condition to check.
Résultat void

IsFalse() public static méthode

Assert that a condition is false.
public static IsFalse ( bool condition, string message ) : void
condition bool The condition to check.
message string Details about the assertion.
Résultat void

IsNotNull() public static méthode

public static IsNotNull ( object value ) : void
value object
Résultat void

IsNotNull() public static méthode

public static IsNotNull ( object value, string message ) : void
value object
message string
Résultat void

IsNull() public static méthode

public static IsNull ( object value ) : void
value object
Résultat void

IsNull() public static méthode

public static IsNull ( object value, string message ) : void
value object
message string
Résultat void

IsTrue() public static méthode

Assert that a condition is true.
public static IsTrue ( bool condition ) : void
condition bool The condition to check.
Résultat void

IsTrue() public static méthode

Assert that a condition is true.
public static IsTrue ( bool condition, string message ) : void
condition bool The condition to check.
message string Details about the assertion.
Résultat void

StartsWith() public static méthode

Assert that a string starts with another.
public static StartsWith ( string text, string substring ) : void
text string The text to search.
substring string The substring to find.
Résultat void

StartsWith() public static méthode

Assert that a string starts with another.
public static StartsWith ( string text, string substring, string message ) : void
text string The text to search.
substring string The substring to find.
message string Details about the assertion.
Résultat void