C# Класс NUnit.Framework.StringAssert

Basic Asserts on strings.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
Equals ( object a, object b ) : bool
ReferenceEquals ( object a, object b ) : void

Описание методов

AreEqualIgnoringCase() статический публичный Метод

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
Результат void

AreEqualIgnoringCase() статический публичный Метод

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
Результат void

AreNotEqualIgnoringCase() статический публичный Метод

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
Результат void

AreNotEqualIgnoringCase() статический публичный Метод

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
Результат void

Contains() статический публичный Метод

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
Результат void

Contains() статический публичный Метод

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
Результат void

DoesNotContain() статический публичный Метод

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
Результат void

DoesNotContain() статический публичный Метод

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
Результат void

DoesNotEndWith() статический публичный Метод

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
Результат void

DoesNotEndWith() статический публичный Метод

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
Результат void

DoesNotMatch() статический публичный Метод

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
Результат void

DoesNotMatch() статический публичный Метод

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
Результат void

DoesNotStartWith() статический публичный Метод

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
Результат void

DoesNotStartWith() статический публичный Метод

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
Результат void

EndsWith() статический публичный Метод

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
Результат void

EndsWith() статический публичный Метод

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
Результат void

IsMatch() статический публичный Метод

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
Результат void

IsMatch() статический публичный Метод

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
Результат void

StartsWith() статический публичный Метод

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
Результат void

StartsWith() статический публичный Метод

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
Результат void