示例#1
0
        public void GetAlgorithmIndex_ValidIndex_ReturnsRightIndexOne()
        {
            int expectedResult = 1;

            ArrayCompare.ClearAlgorithmQueue();

            ArrayCompare.AddAlgorithmToQueue("Selection Sort", ArraySortingAlgorithms.SelectionSort);
            ArrayCompare.AddAlgorithmToQueue("Bubble Sort", ArraySortingAlgorithms.BubbleSort);
            int result = ArrayCompare.GetAlgorithmIndex("Bubble Sort");

            Assert.AreEqual(expectedResult, result);
        }