public void InsertAndRemoveAt <TPriority, TValue>(
            [PexAssumeUnderTest] BinaryHeap <TPriority, TValue> target,
            [PexAssumeNotNull] KeyValuePair <TPriority, TValue>[] kvs,
            int removeAtIndex)
        {
            foreach (var kv in kvs)
            {
                target.Add(kv.Key, kv.Value);
            }
            var count   = target.Count;
            var removed = target.RemoveAt(removeAtIndex);

            Assert.AreEqual(count - 1, target.Count);
            AssertInvariant <TPriority, TValue>(target);
        }
        private void InsertAndRemoveAt <TPriority, TValue>(
            BinaryHeap <TPriority, TValue> target,
            KeyValuePair <TPriority, TValue>[] kvs,
            int removeAtIndex)
        {
            foreach (var kv in kvs)
            {
                target.Add(kv.Key, kv.Value);
            }
            var count   = target.Count;
            var removed = target.RemoveAt(removeAtIndex);

            Assert.Equal(count - 1, target.Count);
            AssertInvariant <TPriority, TValue>(target);
        }
        public void InsertAndRemoveAtAll <TPriority, TValue>(
            [PexAssumeUnderTest] BinaryHeap <TPriority, TValue> target,
            [PexAssumeNotNull] KeyValuePair <TPriority, TValue>[] kvs)
        {
            foreach (var kv in kvs)
            {
                target.Add(kv.Key, kv.Value);
            }
            var call = PexChoose.FromCall(this);

            for (int i = target.Count - 1; i > -1; ++i)
            {
                target.RemoveAt(call.ValueFromRange(i.ToString(), 0, target.Count - 1));
                AssertInvariant <TPriority, TValue>(target);
            }
        }