public void BinaryHeapGetRightChildTest() { var heapData = GetMaxHeapTestData(); List <int> childList = new List <int>(); for (int i = 0; i < heapData.Length; i++) { childList.Add(BinaryHeapBase <int, int> .GetRightChild(heapData.Length, i)); } CollectionAssert.AreEqual(new int[] { 2, 4, 6, -1, -1, -1, -1 }, childList); }
public void BinaryHeapGetRightChildGuardCase2Test() { var heapData = GetMaxHeapTestData(); var result = BinaryHeapBase <int, int> .GetRightChild(heapData.Length, 7); }