public void CopyFile_CopyFile_FileExists()
        {
            var targetPath = Path.Combine(_xcodeProjectPath, "SomeDirectory", "Test.m");

            BuildPostProcess.CopyFile(_testFilePath, targetPath, new TestLogger());

            Assert.IsTrue(File.Exists(targetPath));
        }
        public void CopyFile_FileAlreadyExists_LogsSkipMessage()
        {
            var testLogger = new TestLogger();
            var targetPath = Path.Combine(_xcodeProjectPath, "SomeDirectory", "Test.m");

            BuildPostProcess.CopyFile(_testFilePath, targetPath, testLogger);
            BuildPostProcess.CopyFile(_testFilePath, targetPath, testLogger);

            Assert.IsTrue(testLogger.Logs.Any(log =>
                                              log.logLevel == SentryLevel.Debug &&
                                              log.message.Contains("has already been copied to")));
        }
 public void CopyFile_FailedToCopyFile_ThrowsFileNotFoundException() =>
 Assert.Throws <FileNotFoundException>(() =>
                                       BuildPostProcess.CopyFile("non-existent-path.m",
                                                                 Path.Combine(_xcodeProjectPath, "NewDirectory", "Test.m"), new TestLogger()));