private static void AssertNoDuplicatePaths([NotNull] FileReplaceArguments arguments) { if (AbsolutePath.AreEquivalent(arguments.SourcePath, arguments.DestinationPath)) { throw ErrorFactory.System.FileIsInUse(); } if (AbsolutePath.AreEquivalent(arguments.SourcePath, arguments.BackupDestinationPath)) { throw ErrorFactory.System.UnableToRemoveFileToBeReplaced(); } if (AbsolutePath.AreEquivalent(arguments.DestinationPath, arguments.BackupDestinationPath)) { throw ErrorFactory.System.UnableToMoveReplacementFile(); } }