예제 #1
0
        public void MergeSortTest()
        {
            //Act
            var merge = new MergeSort <int>();

            merge.Items.AddRange(items);
            merge.Sort();
            items.Sort();

            //Assert
            for (int i = 0; i < items.Count; i++)
            {
                Assert.AreEqual(items[i], merge.Items[i]);
            }
        }
예제 #2
0
        public void MergeTest()
        {
            // arrange
            var merge = new MergeSort <int>();

            merge.Items.AddRange(Items);

            // act
            merge.Sort();

            // assert
            for (int i = 0; i < Items.Count; i++)
            {
                Assert.AreEqual(Sorted[i], merge.Items[i]);
            }
        }