public async Task CreateDnsForwardingRuleset() { // ARRANGE var dnsForwardingRulesetData = new DnsForwardingRulesetData(this.DefaultLocation); dnsForwardingRulesetData.DnsResolverOutboundEndpoints.Add(new WritableSubResource() { Id = outboundEndpointId, }); var dnsForwardingRulesetName = Recording.GenerateAssetName("dnsForwardingRuleset-"); // ACT var dnsForwardingRuleset = await dnsForwardingRulesetCollection.CreateOrUpdateAsync(WaitUntil.Completed, dnsForwardingRulesetName, dnsForwardingRulesetData); // ASSERT Assert.AreEqual(dnsForwardingRuleset.Value.Data.ProvisioningState, ProvisioningState.Succeeded); }
private async Task <DnsForwardingRulesetResource> CreateDnsForwardingRuleset(string dnsForwardingRulesetName) { var dnsForwardingRulesetData = new DnsForwardingRulesetData(this.DefaultLocation); dnsForwardingRulesetData.DnsResolverOutboundEndpoints.Add(new WritableSubResource() { Id = outboundEndpointId, }); return((await dnsForwardingRulesetCollection.CreateOrUpdateAsync(WaitUntil.Completed, dnsForwardingRulesetName, dnsForwardingRulesetData)).Value); }