public void GetDirectoriesReturnsAllFoldersInFolder() { var sut = new SystemFileDescriptorProvider(); var descriptor = new FileDescriptor(TestResources.ResourcesPath) { IsFolder = true}; var folders = sut.GetDirectories(descriptor); Assert.That(folders.Select(x => x.Path), Is.EquivalentTo(new[] { TestResources.SubPath })); }
public void FolderDescriptorsHaveCorrectStats() { TestResources.Initialize(); var sut = new SystemFileDescriptorProvider(); var descriptor = new FileDescriptor(TestResources.ResourcesPath); var file = sut.GetDirectories(descriptor).First(x => x.Path == TestResources.SubPath); Assert.That(file.Size, Is.EqualTo(0)); Assert.That(file.CreateTime, Is.EqualTo(TestResources.SubFolderCreateTime)); Assert.That(file.ModifyTime, Is.EqualTo(TestResources.SubFolderModifyTime)); Assert.That(file.IsFolder, Is.True); }