public void FolderComparison_DifferentSubFolders_FalseAndListOfDifferentFiles()
        {
            using (var temporaryFolder1 = new TemporaryFolder())
            using (var temporaryFolder2 = new TemporaryFolder())
            {
                IFolder subFolder1 = temporaryFolder1.CreateFolder("subFolder1");
                IFolder subFolder2 = temporaryFolder2.CreateFolder("subFolder2");
                subFolder1.CreateFile("test11.txt");
                subFolder1.CreateFile("test12.txt");
                subFolder2.CreateFile("test21.txt");
                subFolder2.CreateFile("test22.txt");

                IFolderComparisonReport folderComparisonReport = temporaryFolder1.Compare(temporaryFolder2, ReportOption.CollectDifferentFiles);
                CollectionAssert.AreEqual(new[] { "subfolder1" }, folderComparisonReport.Folder1Files);
                CollectionAssert.AreEqual(new[] { "subfolder2" }, folderComparisonReport.Folder2Files);
                Assert.That(folderComparisonReport.Equal, Is.False);
            }
        }
        public void FolderComparison_FoldersWithSameSubFolders_True()
        {
            using (var temporaryFolder1 = new TemporaryFolder())
            using (var temporaryFolder2 = new TemporaryFolder())
            {
                temporaryFolder1.CreateFolder("test1");
                temporaryFolder2.CreateFolder("test1");

                IFolderComparisonReport report = temporaryFolder1.Compare(temporaryFolder2);
                Assert.That(report.Equal, Is.True);
            }
        }
        public void FolderComparison_FoldersWithDifferentSubFolders_False()
        {
            using (var temporaryFolder1 = new TemporaryFolder())
            using (var temporaryFolder2 = new TemporaryFolder())
            {
                temporaryFolder1.CreateFolder("test1");
                temporaryFolder2.CreateFolder("test2");

                IFolderComparisonReport report = temporaryFolder1.Compare(temporaryFolder2);
                Assert.That(report.Equal, Is.False);
            }
        }
        public void FolderComparison_FoldersWithSameSubFoldersButDifferentFiles_False()
        {
            using (var temporaryFolder1 = new TemporaryFolder())
            using (var temporaryFolder2 = new TemporaryFolder())
            {
                IFolder folder1 = temporaryFolder1.CreateFolder("test");
                IFolder folder2 = temporaryFolder2.CreateFolder("test");

                folder1.CreateFile("file_1");
                folder2.CreateFile("file_2");
                IFolderComparisonReport report = temporaryFolder1.Compare(temporaryFolder2);
                Assert.That(report.Equal, Is.False);
            }
        }
        public void FolderComparison_FilesListNotFoundInFolderAndSubFolder_False()
        {
            using (var temporaryFolder = new TemporaryFolder())
            {
                temporaryFolder.CreateFile("file1.txt");
                temporaryFolder.CreateFile("file2.txt");
                IFolder subFolder = temporaryFolder.CreateFolder("subFolder");
                subFolder.CreateFile("subFolderFile1.dat");

                string[] filesList = new StringBuilder()
                    .AppendLine("file1.txt")
                    .AppendLine("file2.txt")
                    .AppendLine(@"subFolder\subFolderFile1.dat")
                    .AppendLine(@"subFolder\subFolderFile2.dat")
                    .ToString()
                    .Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);

                IFolderComparisonReport folderComparisonReport = temporaryFolder.Compare(filesList);
                Assert.That(folderComparisonReport.Equal, Is.False);
            }
        }