public void CopyFileTest() { using (IStorage storage = new StorageTest()) { var basePath = storage.BasePath + "CopyFileTest/"; Directory.CreateDirectory(basePath); File.WriteAllText(basePath + "file1.txt", "TESTING\n123"); storage.CopyFile("CopyFileTest/file1.txt", "CopyFileTest/Copy/copied_file1.txt"); storage.CopyFile("CopyFileTest/file1.txt", "CopyFileTest/copied_file2.txt"); Assert.IsTrue(Directory.Exists(basePath + "Copy/")); Assert.IsTrue(File.Exists(basePath + "file1.txt")); Assert.IsTrue(File.Exists(basePath + "Copy/copied_file1.txt")); Assert.IsTrue(File.Exists(basePath + "copied_file2.txt")); string file1Content = File.ReadAllText((basePath + "file1.txt"), System.Text.Encoding.UTF8); string copiedFile1Content = File.ReadAllText((basePath + "Copy/copied_file1.txt"), System.Text.Encoding.UTF8); string copiedFile2Content = File.ReadAllText((basePath + "copied_file2.txt"), System.Text.Encoding.UTF8); Assert.AreEqual(file1Content, copiedFile1Content); Assert.AreEqual(file1Content, copiedFile2Content); } }