public async Task CheckHostNameAvailability() { SubscriptionResource subscription = await Client.GetDefaultSubscriptionAsync(); ResourceGroupResource rg = await CreateResourceGroup(subscription, "testRg-"); string afdProfileName = Recording.GenerateAssetName("AFDProfile-"); ProfileResource afdProfile = await CreateAfdProfile(rg, afdProfileName, CdnSkuName.StandardAzureFrontDoor); CheckHostNameAvailabilityContent input = new CheckHostNameAvailabilityContent("customdomain4afdtest.azuretest.net"); CheckNameAvailabilityOutput result = await afdProfile.CheckAfdProfileHostNameAvailabilityAsync(input); Assert.AreEqual(result.NameAvailable, true); }