示例#1
0
        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);
        }
示例#2
0
        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);
        }