Skip to content

Commit

Permalink
Comply to latest standards
Browse files Browse the repository at this point in the history
  • Loading branch information
andrueastman committed Sep 18, 2023
1 parent 7078a6e commit d335384
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ public async Task JsonBatchRequest()
BatchRequestStep requestStep2 = new BatchRequestStep("2", httpRequestMessage2, new List<string> { "1" });

var baseClient = new GraphServiceClient(new HttpClientRequestAdapter(new AnonymousAuthenticationProvider()));
#pragma warning disable CS0618 // Type or member is obsolete
BatchRequestContent batchRequestContent = new BatchRequestContent(baseClient);
batchRequestContent.AddBatchRequestStep(requestStep1);
batchRequestContent.AddBatchRequestStep(requestStep2);
#pragma warning restore CS0618 // Type or member is obsolete

HttpResponseMessage response = await httpClient.PostAsync("https://graph.microsoft.com/v1.0/$batch", batchRequestContent);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public async Task PlannerTaskDetailsUpdate()
Assert.Equal(2, updatedTaskDetails.Checklist.AdditionalData.Count());
Assert.Equal("Do something", ((PlannerCheckListItem)updatedTaskDetails.Checklist.AdditionalData[checklistItemId1])?.Title);
Assert.Equal("Do something else", ((PlannerCheckListItem)updatedTaskDetails.Checklist.AdditionalData[checklistItemId2])?.Title);
Assert.Equal(1, updatedTaskDetails.References.AdditionalData.Count());
Assert.Single(updatedTaskDetails.References.AdditionalData);
Assert.Equal("Developer resources", ((PlannerExternalReference)updatedTaskDetails.References.AdditionalData["http://developer.microsoft.com"])?.Alias);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,9 @@ public async Task It_gets_the_sites_drives_root_children()
Assert.True(siteSearchResults.Value.Count > 0, "Expected at least one search result. Got zero. Check test data.");

// Call the Microsoft Graph API. Get the sites drives collection page.
var drives = graphClient.Sites[siteSearchResults.Value[0].Id]
var drives = await graphClient.Sites[siteSearchResults.Value[0].Id]
.Drives
.GetAsync()
.Result;
.GetAsync();

// Call the Microsoft Graph API. Get the drives collection page.
// var library = graphClient.Sites[siteSearchResults.Value[0].Id]
Expand Down

0 comments on commit d335384

Please sign in to comment.