-
-
Notifications
You must be signed in to change notification settings - Fork 427
Closed
Description
Had a test the other day upon ~500,000 record dataset (I've since refactored this), but attempting to use .ShouldBeUnique() upon this dataset resulted in a test that never completed (not in the amount of time I was willing to wait, anyway.
The offending code can be seen here.
private static List<object> GetDuplicates<T>(IEnumerable<T> items)
{
var list = new List<object>();
var duplicates = new List<object>();
foreach (object o1 in items)
{
duplicates.AddRange(list.Where(o2 => o1 != null && o1.Equals(o2)));
list.Add(o1);
}
return duplicates;
}jafin
Metadata
Metadata
Assignees
Labels
No labels