コード例 #1
0
        public async Task TestDeleteLinkedService()
        {
            LinkedServiceClient client = CreateClient();

            LinkedServiceResource resource = await DisposableLinkedService.CreateResource(client, this.Recording);

            LinkedServiceDeleteLinkedServiceOperation operation = await client.StartDeleteLinkedServiceAsync(resource.Name);

            await operation.WaitAndAssertSuccessfulCompletion();
        }
コード例 #2
0
        public async Task TestRenameLinkedService()
        {
            LinkedServiceClient client = CreateClient();

            LinkedServiceResource resource = await DisposableLinkedService.CreateResource(client, Recording);

            string newLinkedServiceName = Recording.GenerateId("LinkedService2", 16);

            LinkedServiceRenameLinkedServiceOperation renameOperation = await client.StartRenameLinkedServiceAsync(resource.Name, new ArtifactRenameRequest()
            {
                NewName = newLinkedServiceName
            });

            await renameOperation.WaitForCompletionResponseAsync();

            LinkedServiceResource service = await client.GetLinkedServiceAsync(newLinkedServiceName);

            Assert.AreEqual(newLinkedServiceName, service.Name);

            LinkedServiceDeleteLinkedServiceOperation operation = await client.StartDeleteLinkedServiceAsync(newLinkedServiceName);

            await operation.WaitForCompletionResponseAsync();
        }