예제 #1
0
        public void FileInfoList_SortByPath()
        {
            FileInfoList list = new FileInfoList(files);

            list.SortByPath(false);

            for (int i = 0; i < list.Count - 1; i++)
            {
                Assert.IsTrue(String.Compare(list[i].FullName, list[i + 1].FullName, true) >= 0);
            }

            list.SortByPath(true);

            for (int i = 0; i < list.Count - 1; i++)
            {
                Assert.IsTrue(String.Compare(list[i].FullName, list[i + 1].FullName, true) <= 0);
            }
        }