Example #1
0
        public static ResourceGroup CreateResourceGroup(this TestBase testBase, MockContext context, string resourceGroupName)
        {
            ResourceManagementClient resourcesClient = ResourceGroupHelper.GetResourceManagementClient(testBase, context);


            Assert.False(string.IsNullOrEmpty(ResourceGroupLocation), "CSM did not return any valid locations for DNS resources");

            var response = resourcesClient.ResourceGroups.CreateOrUpdate(resourceGroupName,
                                                                         new ResourceGroup
            {
                Location = ResourceGroupLocation
            });

            return(response);
        }
Example #2
0
        public static void DeleteResourceGroup(this TestBase testBase, MockContext context, string resourceGroupName)
        {
            ResourceManagementClient resourcesClient = ResourceGroupHelper.GetResourceManagementClient(testBase, context);

            resourcesClient.ResourceGroups.Delete(resourceGroupName);
        }