public void DynamicPartitionerTest() { Partitioning.QueryDynamicPartitioner(); int partitionCount = Environment.ProcessorCount * 2; int valueCount = partitionCount * 10000; IEnumerable <int> source = Enumerable.Range(1, valueCount); IEnumerable <int> partitionsSource = new Partitioning.DynamicPartitioner <int>(source).GetDynamicPartitions(); IEnumerable <int> values = GetPartitions(partitionsSource, partitionCount).Concat().OrderBy(value => value); EnumerableAssert.AreSequentialEqual(source, values); }