public void RandomExtended_Choose3()
{
using (var verify = new Verify())
{
var rand = new RandomExtended(0);
var source = new List<int>();
for (int i = 100; i < 200; i++)
source.Add(i);
for (int i = 0; i < 100; i += 10)
{
var items = rand.Choose(source, 10, false);
foreach (var item in items)
{
verify.IsBetween(100, item, 199, "Item couldn't be in the source list");
verify.IsTrue(source.Contains(item), "Item should have been left in the list");
}
var distinct = items.Distinct().Count();
verify.AreEqual(items.Count, distinct, "There shouldn't have been any duplicates");
}
}
}