public void ValidateFilesTextEqual_CompareDifferentFiles_ReportFilesNotEqual()
        {
            //Arrange
            var logger = new TestReportLogger();

            Report.AttachLogger(logger);
            var filePath1 = Path.Combine(testFilesDirPath, "TextFile1.txt");
            var filePath2 = Path.Combine(testFilesDirPath, "TextFile2.txt");

            //Act
            FileLibrary.ValidateFilesTextEqual(filePath1, filePath2);

            //Assert
            Report.DetachLogger(logger);
            Assert.AreEqual(
                string.Format("Files '{0}' and '{1}' are not equal.", filePath1, filePath2),
                logger.LastLogMessage);
        }
        public void ValidateFilesTextEqual_CompareFilesWithDifferentEOLOnlyNormalizeEOL_ReportFilesEqual()
        {
            //Arrange
            var logger = new TestReportLogger();

            Report.AttachLogger(logger);
            var filePath1 = Path.Combine(testFilesDirPath, "TextFileUnixEOL.txt");
            var filePath2 = Path.Combine(testFilesDirPath, "TextFileWinEOL.txt");

            //Act
            FileLibrary.ValidateFilesTextEqual(filePath1, filePath2, true);

            //Assert
            Report.DetachLogger(logger);
            Assert.AreEqual(
                string.Format("Files '{0}' and '{1}' are equal.", filePath1, filePath2),
                logger.LastLogMessage);
        }
        public void ValidateFilesTextEqual_CompareNonexistentFile_ReportFileNotExist()
        {
            //Arrange
            var logger = new TestReportLogger();

            Report.AttachLogger(logger);
            var filePath1 = Path.Combine(testFilesDirPath, "TextFile11.txt");
            var filePath2 = Path.Combine(testFilesDirPath, "TextFile2.txt");

            //Act
            FileLibrary.ValidateFilesTextEqual(filePath1, filePath2);

            //Assert
            Report.DetachLogger(logger);
            Assert.AreEqual(
                string.Format("The file '{0}' does not exist.", filePath1),
                logger.LastLogMessage);
        }