public void TestRemoveNonExistant() { List <Cell> cellList = new List <Cell>(testPath); MinHeap <Cell> cellHeap = new MinHeap <Cell>(cellList); Vector3 cellVector = new Vector3(12, 7, 0); Cell newCell = new Cell(cellVector, new Vector3(10, 10, 0)); Assert.IsFalse(cellHeap.Remove(newCell)); }
public void TestRemove() { List <Cell> cellList = new List <Cell>(testPath); MinHeap <Cell> cellHeap = new MinHeap <Cell>(cellList); Vector3 cellVector = new Vector3(12, 7, 0); Cell newCell = new Cell(cellVector, new Vector3(10, 10, 0)); cellHeap.Add(newCell); cellHeap.Remove(newCell); Assert.IsTrue(ValidMinHeap(cellHeap)); }