コード例 #1
0
        public void GetTheBestTest()
        {
            int[] values       = { 1, 2, 10, 24, 12, 44, 10, 5 };
            int   expectedBest = values[0];

            foreach (int value in values)
            {
                if (comparision(value, expectedBest) > 0)
                {
                    expectedBest = value;
                }
                heap.Insert(value);
            }

            Assert.AreEqual(expectedBest, heap.GetTheBest());
        }