Contains
Helper class with properties and methods that supply
a number of constraints used in Asserts.
using NUnit.Framework.Constraints;
using System.Runtime.CompilerServices;
namespace NUnit.Framework
{
[NullableContext(1)]
[Nullable(0)]
public abstract class Contains
{
public static SomeItemsConstraint Item([Nullable(2)] object expected)
{
return new SomeItemsConstraint(new EqualConstraint(expected));
}
public static DictionaryContainsKeyConstraint Key(object expected)
{
return new DictionaryContainsKeyConstraint(expected);
}
public static DictionaryContainsValueConstraint Value([Nullable(2)] object expected)
{
return new DictionaryContainsValueConstraint(expected);
}
public static SubstringConstraint Substring(string expected)
{
return new SubstringConstraint(expected);
}
}
}