Exemple #1
0
        public async Task Copy_RequestForCopyFile_CopyFileByPath()
        {
            UnityDisk.FileStorages.OneDrive.Account account = new UnityDisk.FileStorages.OneDrive.Account();
            await account.SignIn(_login);

            FileStorageFile file = new FileStorageFile(new FileBuilder()
            {
                Name = "ForTestCopy1.exe",
                Path = "/drive/root:"
            })
            {
                Account = new AccountProjection(
                    new UnityDisk.Accounts.Account(account))
            };
            FileStorageFolder folderTo = new FileStorageFolder(new FolderBuilder()
            {
                Name = "ForTestCopy2",
                Path = "/drive/root:"
            })
            {
                Account = new AccountProjection(
                    new UnityDisk.Accounts.Account(account))
            };

            UnityDisk.FileStorages.IFileStorageFolder result =
                await file.Copy(folderTo) as UnityDisk.FileStorages.IFileStorageFolder;

            Assert.IsNull(result);
        }