public async Task Teardown() { if (await _resourceGroup.GetAzureFirewalls().CheckIfExistsAsync(_firewallName)) { AzureFirewall firewall = await _resourceGroup.GetAzureFirewalls().GetAsync(_firewallName); await firewall.DeleteAsync(); } }
public async Task Teardown() { if (await _resourceGroup.GetAzureFirewalls().ExistsAsync(_firewallName)) { AzureFirewall firewall = await _resourceGroup.GetAzureFirewalls().GetAsync(_firewallName); await firewall.DeleteAsync(WaitUntil.Completed); } }
public async Task Delete() { AzureFirewall firewall = await CreateFirewallAsync(); List<AzureFirewall> firewallList = await _resourceGroup.GetAzureFirewalls().GetAllAsync().ToEnumerableAsync(); Assert.AreEqual(1, firewallList.Count); await firewall.DeleteAsync(); firewallList = await _resourceGroup.GetAzureFirewalls().GetAllAsync().ToEnumerableAsync(); Assert.AreEqual(0, firewallList.Count); }