public void GetAzureDnsRecordSetThrowsExceptionWhenUsingNameAndEndsWith()
        {
            var cmdlet = new GetAzureDnsRecordSet
            {
                Name = "record",
                ZoneName = "zone.com",
                ResourceGroupName = "resourceGroup",
                Zone = new DnsZone
                {
                    Name = "zone.com",
                    ResourceGroupName = "resourceGroup"
                },
                RecordType = "A",
                EndsWith = ".com."
            };

            Assert.Throws<PSArgumentException>(() => cmdlet.ExecuteCmdlet());
        }
Ejemplo n.º 2
0
        public void GetAzureDnsRecordSetThrowsExceptionWhenUsingNameAndEndsWith()
        {
            var cmdlet = new GetAzureDnsRecordSet
            {
                Name              = "record",
                ZoneName          = "zone.com",
                ResourceGroupName = "resourceGroup",
                Zone              = new DnsZone
                {
                    Name = "zone.com",
                    ResourceGroupName = "resourceGroup"
                },
                RecordType = "A",
                EndsWith   = ".com."
            };

            Assert.Throws <PSArgumentException>(() => cmdlet.ExecuteCmdlet());
        }