public void FileInfo_IsSame_Backup()
{
string srcFile = GetTestFilePath();
string destFile = GetTestFilePath();
string destBackupPath = GetTestFilePath();
File.Create(srcFile).Dispose();
var destContents = new byte[] { 1, 3, 4, 8 };
File.WriteAllBytes(destFile, destContents);
FileInfo destInfo = new FileInfo(destFile);
FileInfo newInfo = Replace(srcFile, destFile, destBackupPath);
Assert.False(File.Exists(srcFile));
Assert.NotNull(newInfo);
Assert.Equal(destInfo.FullName, newInfo.FullName);
Assert.Equal(destContents, File.ReadAllBytes(destBackupPath));
}