public void MinHeapSupportsConsumingEnumerable()
        {
            int testOrder = 2;

            IList <int> testCollection = new List <int> {
                50, 51, 38, 37, 23, 11, 5, 3
            };

            var minDHeap = new MinDHeap <int>(testOrder, testCollection.Randomize());

            var consumingEnumerator = minDHeap.GetConsumingEnumerable().GetEnumerator();

            Assert.DoesNotThrow(() =>
            {
                while (consumingEnumerator.MoveNext())
                {
                    //ignore empty block
                }
            });
        }
        public void MinHeapConsumingEnumerableRemovesAllElements()
        {
            const int expectedCount = 0;

            int testOrder = 2;

            IList <int> testCollection = new List <int> {
                50, 51, 38, 37, 23, 11, 5, 3
            };

            var minDHeap = new MinDHeap <int>(testOrder, testCollection.Randomize());

            var consumingEnumerator = minDHeap.GetConsumingEnumerable().GetEnumerator();

            while (consumingEnumerator.MoveNext())
            {
                //ignore empty block
            }

            Assert.AreEqual(expectedCount, minDHeap.Count);
        }