Exemple #1
0
        public async Task TearDown()
        {
            var list = await _dnsZone.GetRecordSetAaaas().GetAllAsync().ToEnumerableAsync();

            foreach (var item in list)
            {
                await item.DeleteAsync(WaitUntil.Completed);
            }
        }
Exemple #2
0
        public async Task Exist()
        {
            string dnsZoneName = $"{SessionRecording.GenerateAssetName("sample")}.com";

            _dnsZone = await CreateADnsZone(dnsZoneName, _resourceGroup);

            var    collection = _dnsZone.GetRecordSetAaaas();
            string name       = "aaaa";
            await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, new AaaaRecordSetData()
            {
            });

            Assert.IsTrue(collection.Exists(name));
        }
Exemple #3
0
        public async Task Create()
        {
            string dnsZoneName = $"{SessionRecording.GenerateAssetName("sample")}.com";

            _dnsZone = await CreateADnsZone(dnsZoneName, _resourceGroup);

            var    collection            = _dnsZone.GetRecordSetAaaas();
            string name                  = "aaaa";
            var    recordSetAaaaResource = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, new AaaaRecordSetData()
            {
            });

            Assert.IsNotNull(recordSetAaaaResource);
            Assert.AreEqual(name, recordSetAaaaResource.Value.Data.Name);
            Assert.AreEqual("Succeeded", recordSetAaaaResource.Value.Data.ProvisioningState);
            Assert.AreEqual("dnszones/AAAA", recordSetAaaaResource.Value.Data.ResourceType.Type);
        }
Exemple #4
0
        public async Task GetAll()
        {
            string dnsZoneName = $"{SessionRecording.GenerateAssetName("sample")}.com";

            _dnsZone = await CreateADnsZone(dnsZoneName, _resourceGroup);

            var    collection = _dnsZone.GetRecordSetAaaas();
            string name       = "aaaa";
            await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, new AaaaRecordSetData()
            {
            });

            var list = await collection.GetAllAsync().ToEnumerableAsync();

            Assert.IsNotNull(list);
            Assert.AreEqual(name, list.FirstOrDefault().Data.Name);
        }