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

Assertions that will throw InvalidOperationExceptions when their conditions have not been met.
显示文件 Open project: Azure/azure-mobile-apps-net-client

Public Methods

Method 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

Method Description
GetProperties ( object obj ) : string

Method Details

AreEqual() public static method

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

AreEqual() public static method

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

AreEquivalent() public static method

public static AreEquivalent ( IEnumerable a, IEnumerable b ) : void
a IEnumerable
b IEnumerable
return void

AreEquivalent() public static method

public static AreEquivalent ( IEnumerable a, IEnumerable b, string message ) : void
a IEnumerable
b IEnumerable
message string
return void

AreNotEqual() public static method

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

AreNotEqual() public static method

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

AreSame() public static method

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

AreSame() public static method

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

Contains() public static method

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

Contains() public static method

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

EndsWith() public static method

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

EndsWith() public static method

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

Fail() public static method

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

IsFalse() public static method

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

IsFalse() public static method

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

IsNotNull() public static method

public static IsNotNull ( object value ) : void
value object
return void

IsNotNull() public static method

public static IsNotNull ( object value, string message ) : void
value object
message string
return void

IsNull() public static method

public static IsNull ( object value ) : void
value object
return void

IsNull() public static method

public static IsNull ( object value, string message ) : void
value object
message string
return void

IsTrue() public static method

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

IsTrue() public static method

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

StartsWith() public static method

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

StartsWith() public static method

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