EmptyCollectionConstraint
EmptyCollectionConstraint tests whether a collection is empty.
using System.Collections;
using System.Runtime.CompilerServices;
namespace NUnit.Framework.Constraints
{
[System.Runtime.CompilerServices.NullableContext(1)]
[System.Runtime.CompilerServices.Nullable(0)]
public class EmptyCollectionConstraint : CollectionConstraint
{
public override string Description => "<empty>";
protected override bool Matches(IEnumerable collection)
{
return CollectionConstraint.IsEmpty(collection);
}
}
}