Skip to content

Commit

Permalink
Merge branch 'dev' into kiota/v1.0/pipelinebuild/127844
Browse files Browse the repository at this point in the history
  • Loading branch information
andrueastman authored Nov 2, 2023
2 parents 42b2867 + 3a7f6d3 commit ca6ab00
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ var drive = await graphClient.Me.Drive.GetAsync();
To get the current user's root folder of their default drive:

```csharp
var rootItem = await graphClient.Me.Drive.Root.GetAsync();
// Get the user's driveId
var drive = await graphClient.Me.Drive.GetAsync();
var userDriveId = driveItem.Id;
// use the driveId to get the root drive
var rootItem = await graphClient.Drives[userDriveId].Root.GetAsync();
```

`GetAsync` will return a `DriveItem` object on success and throw a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="Moq" Version="4.20.69" />
<PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit" Version="2.6.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public async Task ErrorThrottlingError()
// To get a throttling error, I mocked up a 429 response in a text file and turned on the Fiddler
// autoresponder to return the text file as the response envelope. The autoresponder for this
// scenario responds to EXACT:https://graph.microsoft.com/v1.0/groups/036bd54c-c6e5-43eb-b8b5-03e019e75bd1
ServiceException e = await Assert.ThrowsAsync<ServiceException>(async () => await graphClient.Groups["036bd54c-c6e5-43eb-b8b5-03e019e75bd1"].GetAsync(requestConfiguration => requestConfiguration.Headers.Add("client-request-id", "dddddddd-dddd-dddd-dddd-dddddddddddd")));
ServiceException e = await Assert.ThrowsAsync<ServiceException>(() => graphClient.Groups["036bd54c-c6e5-43eb-b8b5-03e019e75bd1"].GetAsync(requestConfiguration => requestConfiguration.Headers.Add("client-request-id", "dddddddd-dddd-dddd-dddd-dddddddddddd")));

Assert.Contains("tooManyRetries", e.Message);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public async System.Threading.Tasks.Task AddAsync_IdRequired()
).Returns(new JsonSerializationWriter());


await Assert.ThrowsAsync<ODataError>(async () => await graphServiceClient.Groups["groupId"].Members.Ref.PostAsync(userToCreate));
await Assert.ThrowsAsync<ODataError>(() => graphServiceClient.Groups["groupId"].Members.Ref.PostAsync(userToCreate));

}

Expand Down

0 comments on commit ca6ab00

Please sign in to comment.