System.IO.Tests.File_Replace_str_str_str.NoBackup_FileCopiedAndDeleted C# (CSharp) Méthode

NoBackup_FileCopiedAndDeleted() private méthode

private NoBackup_FileCopiedAndDeleted ( ) : void
Résultat void
        public void NoBackup_FileCopiedAndDeleted()
        {
            string srcPath = GetTestFilePath();
            string destPath = GetTestFilePath();

            byte[] srcContents = new byte[] { 1, 2, 3, 4, 5 };
            File.WriteAllBytes(srcPath, srcContents);

            byte[] destContents = new byte[] { 6, 7, 8, 9, 10 };
            File.WriteAllBytes(destPath, destContents);

            Replace(srcPath, destPath, null);

            Assert.False(File.Exists(srcPath));
            Assert.Equal(srcContents, File.ReadAllBytes(destPath));
        }