public void DeletingElem_EmptyArray_Test() { Beap b = new Beap(); b.Delete(5); Assert.AreEqual(0, b.HeapSize); }
public void DeletingElem_ForBranches_Test(int a, int q, int c, int d) { Beap b = new Beap(); b.Insert(10); b.Insert(15); b.Insert(14); b.Insert(25); b.Insert(13); b.Insert(19); b.Insert(20); b.Insert(50); b.Insert(22); b.Delete(a); b.Delete(q); b.Delete(c); b.Delete(d); Assert.AreEqual(5, b.HeapSize); }
public void DeletingElem_LowerRow_Test(int a) { Beap b = new Beap(); b.Insert(0); b.Insert(-1); b.Insert(1); b.Insert(2); b.Delete(a); Assert.AreEqual(3, b.HeapSize); }
public void DeletingElem_FullArray_Test(int toDelete) { Beap b = new Beap(); b.Insert(8); b.Insert(4); b.Insert(10); b.Insert(2); b.Insert(7); b.Delete(toDelete); Assert.AreEqual(4, b.HeapSize); }
public void DeletingElem_ForHeightDecrease_Test(int a) { Beap b = new Beap(); b.Insert(10); b.Insert(15); b.Insert(14); b.Insert(25); b.Insert(13); b.Insert(19); b.Insert(20); b.Delete(a); Assert.AreEqual(6, b.HeapSize); }