public void FolderDetail_Should_Contain_The_Number_OF_Files()
        {
            string pathFolderTest = Path.Combine(Assembly.GetEntryAssembly().Location, @"..\..\..\..\..\FolderForTest");
            string pathTest       = Path.GetFullPath(pathFolderTest);

            FolderDetailReader reader = new FolderDetailReader();

            FolderDetail result = reader.GetFolderDetail(pathTest);

            Assert.AreEqual(result.Files.Count, result.NbFiles);
        }
        public void FolderDetail_Should_Contain_The_Total_Size()
        {
            string pathFolderTest = Path.Combine(Assembly.GetEntryAssembly().Location, @"..\..\..\..\..\FolderForTest");
            string pathTest       = Path.GetFullPath(pathFolderTest);

            FolderDetailReader reader = new FolderDetailReader();

            FolderDetail result = reader.GetFolderDetail(pathTest);

            long totalSize = result.Folders.Sum(folder => folder.Size);

            Assert.AreEqual(totalSize, result.TotalSize);
        }
        public void Files_Should_OrderBy_Size()
        {
            string pathFolderTest = Path.Combine(Assembly.GetEntryAssembly().Location, @"..\..\..\..\..\FolderForTest");
            string pathTest       = Path.GetFullPath(pathFolderTest);

            FolderDetailReader reader = new FolderDetailReader();

            FolderDetail result = reader.GetFolderDetail(pathTest);

            Assert.IsTrue((result.Files[0].Size > result.Files[1].Size), "The first is bigger than the second");
            Assert.IsTrue((result.Files[1].Size > result.Files[2].Size), "The second is bigger than the third");
            Assert.IsTrue((result.Files[2].Size > result.Files[3].Size), "The third is bigger than the fourth");
        }