Ejemplo n.º 1
0
        public void FileInfoList_SortByCreationTime()
        {
            FileInfoList list = new FileInfoList(files);

            list.SortByCreationTime(false);

            for (int i = 0; i < list.Count - 1; i++)
            {
                Assert.IsTrue(list[i].CreationTime >= list[i + 1].CreationTime);
            }

            list.SortByCreationTime(true);

            for (int i = 0; i < list.Count - 1; i++)
            {
                Assert.IsTrue(list[i].CreationTime <= list[i + 1].CreationTime);
            }
        }