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()); }
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); }
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); }