C# Class NUnit.Framework.StringAssert

Basic Asserts on strings.
Mostrar archivo Open project: nunit/nunit Class Usage Examples

Public Methods

Method Description
AreEqualIgnoringCase ( string expected, string actual ) : void

Asserts that two strings are equal, without regard to case.

AreEqualIgnoringCase ( string expected, string actual, string message ) : void

Asserts that two strings are equal, without regard to case.

AreNotEqualIgnoringCase ( string expected, string actual ) : void

Asserts that two strings are not equal, without regard to case.

AreNotEqualIgnoringCase ( string expected, string actual, string message ) : void

Asserts that two strings are not equal, without regard to case.

Contains ( string expected, string actual ) : void

Asserts that a string is found within another string.

Contains ( string expected, string actual, string message ) : void

Asserts that a string is found within another string.

DoesNotContain ( string expected, string actual ) : void

Asserts that a string is found within another string.

DoesNotContain ( string expected, string actual, string message ) : void

Asserts that a string is not found within another string.

DoesNotEndWith ( string expected, string actual ) : void

Asserts that a string does not end with another string.

DoesNotEndWith ( string expected, string actual, string message ) : void

Asserts that a string does not end with another string.

DoesNotMatch ( string pattern, string actual ) : void

Asserts that a string does not match an expected regular expression pattern.

DoesNotMatch ( string pattern, string actual, string message ) : void

Asserts that a string does not match an expected regular expression pattern.

DoesNotStartWith ( string expected, string actual ) : void

Asserts that a string does not start with another string.

DoesNotStartWith ( string expected, string actual, string message ) : void

Asserts that a string does not start with another string.

EndsWith ( string expected, string actual ) : void

Asserts that a string ends with another string.

EndsWith ( string expected, string actual, string message ) : void

Asserts that a string ends with another string.

IsMatch ( string pattern, string actual ) : void

Asserts that a string matches an expected regular expression pattern.

IsMatch ( string pattern, string actual, string message ) : void

Asserts that a string matches an expected regular expression pattern.

StartsWith ( string expected, string actual ) : void

Asserts that a string starts with another string.

StartsWith ( string expected, string actual, string message ) : void

Asserts that a string starts with another string.

Private Methods

Method Description
Equals ( object a, object b ) : bool
ReferenceEquals ( object a, object b ) : void

Method Details

AreEqualIgnoringCase() static public method

Asserts that two strings are equal, without regard to case.
static public AreEqualIgnoringCase ( string expected, string actual ) : void
expected string The expected string
actual string The actual string
return void

AreEqualIgnoringCase() static public method

Asserts that two strings are equal, without regard to case.
static public AreEqualIgnoringCase ( string expected, string actual, string message ) : void
expected string The expected string
actual string The actual string
message string The message to display in case of failure
return void

AreNotEqualIgnoringCase() static public method

Asserts that two strings are not equal, without regard to case.
static public AreNotEqualIgnoringCase ( string expected, string actual ) : void
expected string The expected string
actual string The actual string
return void

AreNotEqualIgnoringCase() static public method

Asserts that two strings are not equal, without regard to case.
static public AreNotEqualIgnoringCase ( string expected, string actual, string message ) : void
expected string The expected string
actual string The actual string
message string The message to display in case of failure
return void

Contains() static public method

Asserts that a string is found within another string.
static public Contains ( string expected, string actual ) : void
expected string The expected string
actual string The string to be examined
return void

Contains() static public method

Asserts that a string is found within another string.
static public Contains ( string expected, string actual, string message ) : void
expected string The expected string
actual string The string to be examined
message string The message to display in case of failure
return void

DoesNotContain() static public method

Asserts that a string is found within another string.
static public DoesNotContain ( string expected, string actual ) : void
expected string The expected string
actual string The string to be examined
return void

DoesNotContain() static public method

Asserts that a string is not found within another string.
static public DoesNotContain ( string expected, string actual, string message ) : void
expected string The expected string
actual string The string to be examined
message string The message to display in case of failure
return void

DoesNotEndWith() static public method

Asserts that a string does not end with another string.
static public DoesNotEndWith ( string expected, string actual ) : void
expected string The expected string
actual string The string to be examined
return void

DoesNotEndWith() static public method

Asserts that a string does not end with another string.
static public DoesNotEndWith ( string expected, string actual, string message ) : void
expected string The expected string
actual string The string to be examined
message string The message to display in case of failure
return void

DoesNotMatch() static public method

Asserts that a string does not match an expected regular expression pattern.
static public DoesNotMatch ( string pattern, string actual ) : void
pattern string The regex pattern to be used
actual string The actual string
return void

DoesNotMatch() static public method

Asserts that a string does not match an expected regular expression pattern.
static public DoesNotMatch ( string pattern, string actual, string message ) : void
pattern string The regex pattern to be used
actual string The actual string
message string The message to display in case of failure
return void

DoesNotStartWith() static public method

Asserts that a string does not start with another string.
static public DoesNotStartWith ( string expected, string actual ) : void
expected string The expected string
actual string The string to be examined
return void

DoesNotStartWith() static public method

Asserts that a string does not start with another string.
static public DoesNotStartWith ( string expected, string actual, string message ) : void
expected string The expected string
actual string The string to be examined
message string The message to display in case of failure
return void

EndsWith() static public method

Asserts that a string ends with another string.
static public EndsWith ( string expected, string actual ) : void
expected string The expected string
actual string The string to be examined
return void

EndsWith() static public method

Asserts that a string ends with another string.
static public EndsWith ( string expected, string actual, string message ) : void
expected string The expected string
actual string The string to be examined
message string The message to display in case of failure
return void

IsMatch() static public method

Asserts that a string matches an expected regular expression pattern.
static public IsMatch ( string pattern, string actual ) : void
pattern string The regex pattern to be matched
actual string The actual string
return void

IsMatch() static public method

Asserts that a string matches an expected regular expression pattern.
static public IsMatch ( string pattern, string actual, string message ) : void
pattern string The regex pattern to be matched
actual string The actual string
message string The message to display in case of failure
return void

StartsWith() static public method

Asserts that a string starts with another string.
static public StartsWith ( string expected, string actual ) : void
expected string The expected string
actual string The string to be examined
return void

StartsWith() static public method

Asserts that a string starts with another string.
static public StartsWith ( string expected, string actual, string message ) : void
expected string The expected string
actual string The string to be examined
message string The message to display in case of failure
return void