C# Class NUnit.Framework.StringAssert

Basic Asserts on strings.
Afficher le fichier Open project: nunit/nunit Class Usage Examples

Méthodes publiques

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

Méthode Description
Equals ( object a, object b ) : bool
ReferenceEquals ( object a, object b ) : void

Method Details

AreEqualIgnoringCase() static public méthode

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

AreEqualIgnoringCase() static public méthode

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

AreNotEqualIgnoringCase() static public méthode

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

AreNotEqualIgnoringCase() static public méthode

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

Contains() static public méthode

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

Contains() static public méthode

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

DoesNotContain() static public méthode

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

DoesNotContain() static public méthode

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

DoesNotEndWith() static public méthode

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

DoesNotEndWith() static public méthode

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

DoesNotMatch() static public méthode

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

DoesNotMatch() static public méthode

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

DoesNotStartWith() static public méthode

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

DoesNotStartWith() static public méthode

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

EndsWith() static public méthode

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

EndsWith() static public méthode

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

IsMatch() static public méthode

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

IsMatch() static public méthode

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

StartsWith() static public méthode

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

StartsWith() static public méthode

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