C# Class NUnit.Framework.Does

Helper class with properties and methods that supply a number of constraints used in Asserts.
Mostrar archivo Open project: msgpack/msgpack-cli Class Usage Examples

Public Methods

Method Description
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.

Method Details

Contain() public static method

Returns a new CollectionContainsConstraint checking for the presence of a particular object in the collection.
public static Contain ( object expected ) : CollectionContainsConstraint
expected object
return NUnit.Framework.Constraints.CollectionContainsConstraint

Contain() public static method

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
return NUnit.Framework.Constraints.ContainsConstraint

EndWith() public static method

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
return NUnit.Framework.Constraints.EndsWithConstraint

Match() public static method

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
return NUnit.Framework.Constraints.RegexConstraint

StartWith() public static method

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
return NUnit.Framework.Constraints.StartsWithConstraint