The easiest way to do that is with AutoFixture's Generator<T>
:
var statuses = fixture
.Create<Generator<Statuses>>()
.Where(s => Statuses.Pending != s)
.Take(10);
If you only need a single value, but want to be sure that it's not Statuses.Pending
, you can do this:
var status = fixture
.Create<Generator<Statuses>>()
.Where(s => Statuses.Pending != s)
.First();
There are other ways, too, but this is the easiest for an ad-hoc query.