예제 #1
0
 public void InsertAndIndexOf <TPriority, TValue>(
     [PexAssumeUnderTest] BinaryHeap <TPriority, TValue> target,
     [PexAssumeNotNull] KeyValuePair <TPriority, TValue>[] kvs)
 {
     foreach (var kv in kvs)
     {
         target.Add(kv.Key, kv.Value);
     }
     foreach (var kv in kvs)
     {
         Assert.IsTrue(target.IndexOf(kv.Value) > -1, "target.IndexOf(kv.Value) > -1");
     }
 }
 private void InsertAndIndexOf <TPriority, TValue>(
     BinaryHeap <TPriority, TValue> target,
     KeyValuePair <TPriority, TValue>[] kvs)
 {
     foreach (var kv in kvs)
     {
         target.Add(kv.Key, kv.Value);
     }
     foreach (var kv in kvs)
     {
         Assert.True(target.IndexOf(kv.Value) > -1);
     }
 }