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

            FileStorageFile file = new FileStorageFile(new FileBuilder()
            {
                Name = "Untitled.png",
                Path = "/drive/root:"
            })
            {
                Account = new AccountProjection(
                    new UnityDisk.Accounts.Account(account))
            };

            await file.CreatePublicUrl();

            await file.DeletePublicUrl();

            Assert.IsTrue(String.IsNullOrEmpty(file.PublicUrl));
            Assert.IsTrue(String.IsNullOrEmpty(file.PublicUrlId));
        }