ConstraintFactory.Contains Method

Definition

Overloads

Contains(Object)

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

Contains(String)

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.

Contains(Object)

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

public NUnit.Framework.Constraints.CollectionContainsConstraint Contains (object expected);
member this.Contains : obj -> NUnit.Framework.Constraints.CollectionContainsConstraint

Parameters

expected
Object

Returns

Applies to

Contains(String)

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 NUnit.Framework.Constraints.ContainsConstraint Contains (string expected);
member this.Contains : string -> NUnit.Framework.Constraints.ContainsConstraint

Parameters

expected
String

Returns

Applies to