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

Helper class with properties and methods that supply a number of constraints used in Asserts.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Contain ( object expected ) : CollectionContainsConstraint

Returns a new CollectionContainsConstraint checking for the presence of a particular object in the collection.

Contain ( string expected ) : NUnit.Framework.Constraints.ContainsConstraint

Returns a new ContainsConstraint. This constraint will, in turn, make use of the appropriate second-level constraint, depending on the type of the actual argument. This overload is only used if the item sought is a string, since any other type implies that we are looking for a collection member.

EndWith ( string expected ) : NUnit.Framework.Constraints.EndsWithConstraint

Returns a constraint that succeeds if the actual value ends with the substring supplied as an argument.

Match ( string pattern ) : RegexConstraint

Returns a constraint that succeeds if the actual value matches the regular expression supplied as an argument.

StartWith ( string expected ) : NUnit.Framework.Constraints.StartsWithConstraint

Returns a constraint that succeeds if the actual value starts with the substring supplied as an argument.

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

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

Returns a new CollectionContainsConstraint checking for the presence of a particular object in the collection.
public static Contain ( object expected ) : CollectionContainsConstraint
expected object
Результат NUnit.Framework.Constraints.CollectionContainsConstraint

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

Returns a new ContainsConstraint. This constraint will, in turn, make use of the appropriate second-level constraint, depending on the type of the actual argument. This overload is only used if the item sought is a string, since any other type implies that we are looking for a collection member.
public static Contain ( string expected ) : NUnit.Framework.Constraints.ContainsConstraint
expected string
Результат NUnit.Framework.Constraints.ContainsConstraint

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

Returns a constraint that succeeds if the actual value ends with the substring supplied as an argument.
public static EndWith ( string expected ) : NUnit.Framework.Constraints.EndsWithConstraint
expected string
Результат NUnit.Framework.Constraints.EndsWithConstraint

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

Returns a constraint that succeeds if the actual value matches the regular expression supplied as an argument.
public static Match ( string pattern ) : RegexConstraint
pattern string
Результат NUnit.Framework.Constraints.RegexConstraint

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

Returns a constraint that succeeds if the actual value starts with the substring supplied as an argument.
public static StartWith ( string expected ) : NUnit.Framework.Constraints.StartsWithConstraint
expected string
Результат NUnit.Framework.Constraints.StartsWithConstraint