From 1c98db2cd5c45fe75dca76d48d91286c9d8194fe Mon Sep 17 00:00:00 2001 From: bquantump <53361486+bquantump@users.noreply.github.com> Date: Mon, 1 Mar 2021 13:09:28 -0800 Subject: [PATCH] Update async test --- sdk/resourcemanager/Proto.Client/src/Program.cs | 2 +- .../Proto.Client/src/Scenarios/GetByContainerAsync.cs | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/sdk/resourcemanager/Proto.Client/src/Program.cs b/sdk/resourcemanager/Proto.Client/src/Program.cs index a8968d46bc111..380b481f7f9cc 100644 --- a/sdk/resourcemanager/Proto.Client/src/Program.cs +++ b/sdk/resourcemanager/Proto.Client/src/Program.cs @@ -10,7 +10,7 @@ static void Main(string[] args) Scenario scenario = null; try { - scenario = ScenarioFactory.GetScenario(Scenarios.GetByContainers); + scenario = ScenarioFactory.GetScenario(Scenarios.GetByContainersAsync); scenario.Execute(); } finally diff --git a/sdk/resourcemanager/Proto.Client/src/Scenarios/GetByContainerAsync.cs b/sdk/resourcemanager/Proto.Client/src/Scenarios/GetByContainerAsync.cs index 13c50526d4e50..638b89da02b69 100644 --- a/sdk/resourcemanager/Proto.Client/src/Scenarios/GetByContainerAsync.cs +++ b/sdk/resourcemanager/Proto.Client/src/Scenarios/GetByContainerAsync.cs @@ -33,9 +33,8 @@ private async Task ExecuteAsync() Debug.Assert(virtualNetwork.Value.Data.Name.Equals(response.Data.Id.Name)); await foreach (var subnetResponse in response.GetSubnetContainer().ListAsync()) { - var actualSubnet = await subnetResponse.GetAsync(); - var subnets = await response.GetSubnetContainer().GetAsync(actualSubnet.Value.Data.Name); - Debug.Assert(subnets.Value.Data.Name.Equals(actualSubnet.Value.Data.Name)); + var subnets = await response.GetSubnetContainer().GetAsync(subnetResponse.Data.Name); + Debug.Assert(subnets.Value.Data.Name.Equals(subnetResponse.Data.Name)); } } Console.WriteLine("\nDone all asserts passed ...");