Exemplo n.º 1
0
        public void Will_parse_resource_group_name_from_full_resource_id()
        {
            string id  = $@"/subscriptions/{AzureEnvVars.SubscriptionId}/resourcegroups/blog/providers/microsoft.operationalinsights/workspaces/";
            string res = AzureUtility.ParseResourceGroupName(id);

            _testOutputHelper.WriteLine(res);

            res.ShouldBe("blog");
        }
Exemplo n.º 2
0
        public async Task Get_success()
        {
            var ws = await Client.WorkspacesService.ListAsync(SubscriptionId);

            var resourceGroupName = AzureUtility.ParseResourceGroupName(ws.Value.First().Id);
            var found             = await Client.WorkspacesService.GetAsync(SubscriptionId,
                                                                            resourceGroupName, ws.Value.First().Name);

            found.ShouldNotBeNull();
            _testOutputHelper.WriteLine(JsonConvert.SerializeObject(found));
        }