Skip to content

Commit 2298a23

Browse files
author
Andrew Omondi (from Dev Box)
committed
Fixes failing tests
1 parent ed83df0 commit 2298a23

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/ErrorTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public async Task ErrorThrottlingError()
1111
// To get a throttling error, I mocked up a 429 response in a text file and turned on the Fiddler
1212
// autoresponder to return the text file as the response envelope. The autoresponder for this
1313
// scenario responds to EXACT:https://graph.microsoft.com/v1.0/groups/036bd54c-c6e5-43eb-b8b5-03e019e75bd1
14-
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")));
14+
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")));
1515

1616
Assert.Contains("tooManyRetries", e.Message);
1717
}

tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/CollectionReferencesRequestTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public async System.Threading.Tasks.Task AddAsync_IdRequired()
7878
).Returns(new JsonSerializationWriter());
7979

8080

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

8383
}
8484

0 commit comments

Comments
 (0)