public void CurrentBeforeMoveNext <TPriority, TValue>(
     [PexAssumeUnderTest] BinaryHeap <TPriority, TValue> target,
     KeyValuePair <TPriority, TValue> kv)
 {
     target.Add(kv.Key, kv.Value);
     PexAssert.Throws <InvalidOperationException>(delegate
     {
         var enumerator = target.GetEnumerator();
         var current    = enumerator.Current;
     });
 }
 public void InsertAndResetAndModify <TPriority, TValue>(
     [PexAssumeUnderTest] BinaryHeap <TPriority, TValue> target,
     KeyValuePair <TPriority, TValue> kv)
 {
     target.Add(kv.Key, kv.Value);
     PexAssert.Throws <InvalidOperationException>(delegate
     {
         var enumerator = target.GetEnumerator();
         target.Add(kv.Key, kv.Value);
         enumerator.Reset();
     });
 }
 private void InsertAndCurrentAndModify <TPriority, TValue>(
     BinaryHeap <TPriority, TValue> target,
     KeyValuePair <TPriority, TValue> kv)
 {
     target.Add(kv.Key, kv.Value);
     Assert.Throws <InvalidOperationException>(delegate
     {
         var enumerator = target.GetEnumerator();
         target.Add(kv.Key, kv.Value);
         var current = enumerator.Current;
     });
 }
 public void CurrentAfterMoveNextFinished <TPriority, TValue>(
     [PexAssumeUnderTest] BinaryHeap <TPriority, TValue> target,
     KeyValuePair <TPriority, TValue> kv)
 {
     target.Add(kv.Key, kv.Value);
     PexAssertEx.Throws <InvalidOperationException>(delegate
     {
         var enumerator = target.GetEnumerator();
         while (enumerator.MoveNext())
         {
             ;
         }
         var current = enumerator.Current;
     });
 }