Example #1
0
        public async Task GetGlobalManagementGroup()
        {
            _mgmtGroupName = SessionRecording.GenerateAssetName("mgmt-group-");
            var mgmtOp = await GlobalClient.GetManagementGroups().CreateOrUpdateAsync(true, _mgmtGroupName, new CreateManagementGroupOptions());

            _mgmtGroup = mgmtOp.Value;
            _mgmtGroup = await _mgmtGroup.GetAsync();
            await StopSessionRecordingAsync();
        }
Example #2
0
        public async Task GetGlobalManagementGroup()
        {
            _mgmtGroupName = SessionRecording.GenerateAssetName("mgmt-group-");
            _mgmtGroup     = await GlobalClient.GetManagementGroups().CreateOrUpdateAsync(_mgmtGroupName, new CreateManagementGroupRequest());

            _mgmtGroup = await _mgmtGroup.GetAsync();

            StopSessionRecording();
        }
Example #3
0
        public async Task Delete()
        {
            ManagementGroup mgmtGroup = await Client.GetManagementGroups().CreateOrUpdateAsync(Recording.GenerateAssetName("mgmt-group-"), new CreateManagementGroupRequest());

            await mgmtGroup.DeleteAsync();

            var ex = Assert.ThrowsAsync <RequestFailedException>(async() => await mgmtGroup.GetAsync());

            Assert.AreEqual(404, ex.Status);
        }
Example #4
0
        public async Task Delete()
        {
            var mgmtGroupOp = await Client.GetManagementGroups().CreateOrUpdateAsync(WaitUntil.Started, Recording.GenerateAssetName("mgmt-group-"), new CreateManagementGroupOptions());

            await mgmtGroupOp.WaitForCompletionAsync();

            ManagementGroup mgmtGroup = mgmtGroupOp.Value;
            await mgmtGroup.DeleteAsync(WaitUntil.Completed);

            var ex = Assert.ThrowsAsync <RequestFailedException>(async() => await mgmtGroup.GetAsync());

            Assert.AreEqual(404, ex.Status);
        }