Example #1
0
        public static async ValueTask <DataFlowResource> CreateResource(DataFlowClient client, TestRecording recording)
        {
            string name = recording.GenerateAssetName("DataFlow");
            DataFlowCreateOrUpdateDataFlowOperation create = await client.StartCreateOrUpdateDataFlowAsync(name, new DataFlowResource (new DataFlow()));

            return(await create.WaitForCompletionAsync());
        }
Example #2
0
        public async Task TestCreateDataFlow()
        {
            string dataFlowName = Recording.GenerateName("DataFlow");
            DataFlowCreateOrUpdateDataFlowOperation operation = await DataFlowClient.StartCreateOrUpdateDataFlowAsync(dataFlowName, new DataFlowResource(new DataFlow()));

            DataFlowResource dataFlow = await operation.WaitForCompletionAsync();

            Assert.AreEqual(dataFlowName, dataFlow.Name);
        }
        public async Task TestCreateDataFlow()
        {
            var operation = await DataFlowClient.StartCreateOrUpdateDataFlowAsync("MyDataFlow", new DataFlowResource(new DataFlow()));

            while (!operation.HasValue)
            {
                operation.UpdateStatus();
            }
            Assert.AreEqual("MyDataFlow", operation.Value.Name);
        }
Example #4
0
        public async Task TestDeleteDataFlow()
        {
            string dataFlowName = Recording.GenerateName("DataFlow");

            DataFlowCreateOrUpdateDataFlowOperation createOperation = await DataFlowClient.StartCreateOrUpdateDataFlowAsync(dataFlowName, new DataFlowResource(new DataFlow()));

            await createOperation.WaitForCompletionAsync();

            DataFlowDeleteDataFlowOperation deleteOperation = await DataFlowClient.StartDeleteDataFlowAsync(dataFlowName);

            Response response = await deleteOperation.WaitForCompletionAsync();

            Assert.AreEqual(200, response.Status);
        }