From 7078a6e1ebe0cc1cb3f4daacc23f1a89fd52a87b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Sep 2023 11:00:27 +0000 Subject: [PATCH 1/2] Bump xunit from 2.5.0 to 2.5.1 Bumps [xunit](https://github.com/xunit/xunit) from 2.5.0 to 2.5.1. - [Commits](https://github.com/xunit/xunit/compare/2.5.0...2.5.1) --- updated-dependencies: - dependency-name: xunit dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .../Microsoft.Graph.DotnetCore.Test.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Microsoft.Graph.DotnetCore.Test/Microsoft.Graph.DotnetCore.Test.csproj b/tests/Microsoft.Graph.DotnetCore.Test/Microsoft.Graph.DotnetCore.Test.csproj index 4a26e981333..bf45cb1831b 100644 --- a/tests/Microsoft.Graph.DotnetCore.Test/Microsoft.Graph.DotnetCore.Test.csproj +++ b/tests/Microsoft.Graph.DotnetCore.Test/Microsoft.Graph.DotnetCore.Test.csproj @@ -18,7 +18,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From d3353841f0d13093a605be5736063b3c9177a65e Mon Sep 17 00:00:00 2001 From: Andrew Omondi Date: Mon, 18 Sep 2023 14:04:15 +0300 Subject: [PATCH 2/2] Comply to latest standards --- .../Requests/Functional/BatchRequestTests.cs | 2 ++ .../Requests/Functional/PlannerTests.cs | 2 +- .../Requests/Functional/SharePointTests.cs | 5 ++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/BatchRequestTests.cs b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/BatchRequestTests.cs index d21c87d452f..c6ac55ba990 100644 --- a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/BatchRequestTests.cs +++ b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/BatchRequestTests.cs @@ -33,9 +33,11 @@ public async Task JsonBatchRequest() BatchRequestStep requestStep2 = new BatchRequestStep("2", httpRequestMessage2, new List { "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); diff --git a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/PlannerTests.cs b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/PlannerTests.cs index abc46a6eaa9..818f29db0d6 100644 --- a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/PlannerTests.cs +++ b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/PlannerTests.cs @@ -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); } diff --git a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/SharePointTests.cs b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/SharePointTests.cs index 20a6cdf63f0..dfef1ae71e1 100644 --- a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/SharePointTests.cs +++ b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/SharePointTests.cs @@ -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]