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