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(); }
public async Task GetGlobalManagementGroup() { _mgmtGroupName = SessionRecording.GenerateAssetName("mgmt-group-"); _mgmtGroup = await GlobalClient.GetManagementGroups().CreateOrUpdateAsync(_mgmtGroupName, new CreateManagementGroupRequest()); _mgmtGroup = await _mgmtGroup.GetAsync(); StopSessionRecording(); }
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); }
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); }