From 41496fb7c187f3645a6a1cb46a936bd98fce8517 Mon Sep 17 00:00:00 2001 From: "Andrew Omondi (from Dev Box)" Date: Thu, 2 Nov 2023 11:32:08 +0300 Subject: [PATCH] Bumps version and release notes Fixes warnings in test projects --- CHANGELOG.md | 4 +++ .../Extensions/PlannerCheckListItem.cs | 21 ++++++++++--- src/Microsoft.Graph/Microsoft.Graph.csproj | 2 +- .../Requests/Functional/DeltaQueryTests.cs | 30 +++++++++---------- .../Requests/Functional/ExcelTests.cs | 2 +- .../Requests/Functional/OneDriveTests.cs | 6 ++-- .../Requests/Functional/OneNoteTests.cs | 12 ++++---- .../Functional/UserActivitiesTests.cs | 2 +- .../Requests/Functional/UserTests.cs | 6 ++-- .../Requests/Generated/ActionRequestTests.cs | 6 ++-- 10 files changed, 54 insertions(+), 37 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 33c93b4b9a2..53bf2dee0e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project does adheres to [Semantic Versioning](https://semver.org/spec/v ## [Unreleased] +## [5.33.0] - 2023-11-02 + +- Latest metadata updates from 31st October 2023. + ## [5.32.0] - 2023-10-24 - SDK is compatible with trimming(https://github.com/microsoftgraph/msgraph-sdk-dotnet/pull/2174) diff --git a/src/Microsoft.Graph/Extensions/PlannerCheckListItem.cs b/src/Microsoft.Graph/Extensions/PlannerCheckListItem.cs index e18866c0c4c..df5d05f735e 100644 --- a/src/Microsoft.Graph/Extensions/PlannerCheckListItem.cs +++ b/src/Microsoft.Graph/Extensions/PlannerCheckListItem.cs @@ -9,7 +9,7 @@ namespace Microsoft.Graph.Models; -public class PlannerCheckListItem: IAdditionalDataHolder, IBackedModel, IParsable +public class PlannerChecklistItem: IAdditionalDataHolder, IBackedModel, IParsable { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { @@ -87,7 +87,7 @@ public string Title { /// /// Instantiates a new auditActivityInitiator and sets the default values. /// - public PlannerCheckListItem() { + public PlannerChecklistItem() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); AdditionalData = new Dictionary(); OdataType = "#microsoft.graph.plannerChecklistItem"; @@ -96,9 +96,9 @@ public PlannerCheckListItem() { /// Creates a new instance of the appropriate class based on discriminator value /// /// The parse node to use to read the discriminator value and create the object - public static PlannerCheckListItem CreateFromDiscriminatorValue(IParseNode parseNode) { + public static PlannerChecklistItem CreateFromDiscriminatorValue(IParseNode parseNode) { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PlannerCheckListItem(); + return new PlannerChecklistItem(); } /// /// The deserialization information for the current model @@ -128,3 +128,16 @@ public void Serialize(ISerializationWriter writer) { writer.WriteAdditionalData(AdditionalData); } } + +[Obsolete("This class is obsolete due to incorrect naming. Use PlannerChecklistItem instead.")] +public class PlannerCheckListItem: PlannerChecklistItem +{ + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static new PlannerCheckListItem CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new PlannerCheckListItem(); + } +} diff --git a/src/Microsoft.Graph/Microsoft.Graph.csproj b/src/Microsoft.Graph/Microsoft.Graph.csproj index 0a440862cf9..80d76a4cc30 100644 --- a/src/Microsoft.Graph/Microsoft.Graph.csproj +++ b/src/Microsoft.Graph/Microsoft.Graph.csproj @@ -22,7 +22,7 @@ false 35MSSharedLib1024.snk true - 5.32.0 + 5.33.0 diff --git a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/DeltaQueryTests.cs b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/DeltaQueryTests.cs index 1da2e03310b..891d5210ca2 100644 --- a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/DeltaQueryTests.cs +++ b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/DeltaQueryTests.cs @@ -15,18 +15,18 @@ public class DeltaQueryTests: GraphTestBase public async Task DeltaLinkDriveItem() { // Get our first delta page. - var driveItemDeltaCollectionPage = await graphClient.Drives["driveId"].Items["itemId"].Delta.GetAsync(); + var driveItemDeltaCollectionPage = await graphClient.Drives["driveId"].Items["itemId"].Delta.GetAsDeltaGetResponseAsync(); // Go through all of the delta pages so that we can get the delta link on the last page. while (driveItemDeltaCollectionPage.OdataNextLink != null) { - driveItemDeltaCollectionPage = await new Microsoft.Graph.Drives.Item.Items.Item.Delta.DeltaRequestBuilder(driveItemDeltaCollectionPage.OdataNextLink, graphClient.RequestAdapter).GetAsync(); + driveItemDeltaCollectionPage = await new Microsoft.Graph.Drives.Item.Items.Item.Delta.DeltaRequestBuilder(driveItemDeltaCollectionPage.OdataNextLink, graphClient.RequestAdapter).GetAsDeltaGetResponseAsync(); } // Now let's use the deltalink to make sure there aren't any changes. There shouldn't be. if (driveItemDeltaCollectionPage.OdataDeltaLink != null) { - driveItemDeltaCollectionPage = await new Microsoft.Graph.Drives.Item.Items.Item.Delta.DeltaRequestBuilder(driveItemDeltaCollectionPage.OdataDeltaLink, graphClient.RequestAdapter).GetAsync(); + driveItemDeltaCollectionPage = await new Microsoft.Graph.Drives.Item.Items.Item.Delta.DeltaRequestBuilder(driveItemDeltaCollectionPage.OdataDeltaLink, graphClient.RequestAdapter).GetAsDeltaGetResponseAsync(); } Assert.Empty(driveItemDeltaCollectionPage.Value); @@ -38,7 +38,7 @@ public async Task DeltaLinkDriveItem() // Now let's use the deltalink to make sure there aren't any changes. if (driveItemDeltaCollectionPage.OdataDeltaLink != null) { - driveItemDeltaCollectionPage = await new Microsoft.Graph.Drives.Item.Items.Item.Delta.DeltaRequestBuilder(driveItemDeltaCollectionPage.OdataDeltaLink, graphClient.RequestAdapter).GetAsync(); + driveItemDeltaCollectionPage = await new Microsoft.Graph.Drives.Item.Items.Item.Delta.DeltaRequestBuilder(driveItemDeltaCollectionPage.OdataDeltaLink, graphClient.RequestAdapter).GetAsDeltaGetResponseAsync(); } // We expect two changes, one new item, and the root folder will have a change. @@ -54,18 +54,18 @@ public async Task DeltaLinkDriveItem() public async Task DeltaLinkMessages() { // Get our first delta page. - var messagesDeltaCollectionPage = await graphClient.Me.MailFolders["inbox"].Messages.Delta.GetAsync(); + var messagesDeltaCollectionPage = await graphClient.Me.MailFolders["inbox"].Messages.Delta.GetAsDeltaGetResponseAsync(); // Go through all of the delta pages so that we can get the delta link on the last page. while (messagesDeltaCollectionPage.OdataNextLink != null) { - messagesDeltaCollectionPage = await new Microsoft.Graph.Me.MailFolders.Item.Messages.Delta.DeltaRequestBuilder(messagesDeltaCollectionPage.OdataNextLink,graphClient.RequestAdapter).GetAsync(); + messagesDeltaCollectionPage = await new Microsoft.Graph.Me.MailFolders.Item.Messages.Delta.DeltaRequestBuilder(messagesDeltaCollectionPage.OdataNextLink,graphClient.RequestAdapter).GetAsDeltaGetResponseAsync(); } // Now let's use the deltalink to make sure there aren't any changes. There shouldn't be. if (messagesDeltaCollectionPage.OdataDeltaLink != null) { - messagesDeltaCollectionPage = await new Microsoft.Graph.Me.MailFolders.Item.Messages.Delta.DeltaRequestBuilder(messagesDeltaCollectionPage.OdataNextLink,graphClient.RequestAdapter).GetAsync(); + messagesDeltaCollectionPage = await new Microsoft.Graph.Me.MailFolders.Item.Messages.Delta.DeltaRequestBuilder(messagesDeltaCollectionPage.OdataNextLink,graphClient.RequestAdapter).GetAsDeltaGetResponseAsync(); } Assert.Empty(messagesDeltaCollectionPage.Value); @@ -75,7 +75,7 @@ public async Task DeltaLinkMessages() // Now let's use the deltalink to make sure there aren't any changes. We expect to see a new message. if (messagesDeltaCollectionPage.OdataDeltaLink != null) { - messagesDeltaCollectionPage = await new Microsoft.Graph.Me.MailFolders.Item.Messages.Delta.DeltaRequestBuilder(messagesDeltaCollectionPage.OdataNextLink,graphClient.RequestAdapter).GetAsync(); + messagesDeltaCollectionPage = await new Microsoft.Graph.Me.MailFolders.Item.Messages.Delta.DeltaRequestBuilder(messagesDeltaCollectionPage.OdataNextLink,graphClient.RequestAdapter).GetAsDeltaGetResponseAsync(); } // We expect two changes, one new item, and the root folder will have a change. @@ -86,20 +86,20 @@ public async Task DeltaLinkMessages() public async Task UserDeltaLink() { // Get our first delta page. - var userDeltaCollectionPage = await graphClient.Users.Delta.GetAsync(); + var userDeltaCollectionPage = await graphClient.Users.Delta.GetAsDeltaGetResponseAsync(); //var userDeltaCollectionPage = userDeltaCollectionPageResult.Value; // Go through all of the delta pages so that we can get the delta link on the last page. while (userDeltaCollectionPage.OdataNextLink != null) { - userDeltaCollectionPage = await new Microsoft.Graph.Users.Delta.DeltaRequestBuilder(userDeltaCollectionPage.OdataNextLink, graphClient.RequestAdapter).GetAsync(); + userDeltaCollectionPage = await new Microsoft.Graph.Users.Delta.DeltaRequestBuilder(userDeltaCollectionPage.OdataNextLink, graphClient.RequestAdapter).GetAsDeltaGetResponseAsync(); } // Now let's use the deltalink to make sure there aren't any changes. We won't test this collection // since other tests could be making changes to the users in the org. if (userDeltaCollectionPage.OdataDeltaLink != null) { - userDeltaCollectionPage = await new Microsoft.Graph.Users.Delta.DeltaRequestBuilder(userDeltaCollectionPage.OdataDeltaLink, graphClient.RequestAdapter).GetAsync(); + userDeltaCollectionPage = await new Microsoft.Graph.Users.Delta.DeltaRequestBuilder(userDeltaCollectionPage.OdataDeltaLink, graphClient.RequestAdapter).GetAsDeltaGetResponseAsync(); } } @@ -107,18 +107,18 @@ public async Task UserDeltaLink() public async Task GroupDeltaLink() { // Get our first delta page. - var groupDeltaCollectionPage = await graphClient.Groups.Delta.GetAsync(); + var groupDeltaCollectionPage = await graphClient.Groups.Delta.GetAsDeltaGetResponseAsync(); // Go through all of the delta pages so that we can get the delta link on the last page. while (groupDeltaCollectionPage.OdataNextLink != null) { - groupDeltaCollectionPage = await new Microsoft.Graph.Groups.Delta.DeltaRequestBuilder(groupDeltaCollectionPage.OdataNextLink,graphClient.RequestAdapter).GetAsync(); + groupDeltaCollectionPage = await new Microsoft.Graph.Groups.Delta.DeltaRequestBuilder(groupDeltaCollectionPage.OdataNextLink,graphClient.RequestAdapter).GetAsDeltaGetResponseAsync(); } // Now let's use the deltalink to make sure there aren't any changes. if (groupDeltaCollectionPage.OdataDeltaLink != null) { - groupDeltaCollectionPage = await new Microsoft.Graph.Groups.Delta.DeltaRequestBuilder(groupDeltaCollectionPage.OdataDeltaLink,graphClient.RequestAdapter).GetAsync(); + groupDeltaCollectionPage = await new Microsoft.Graph.Groups.Delta.DeltaRequestBuilder(groupDeltaCollectionPage.OdataDeltaLink,graphClient.RequestAdapter).GetAsDeltaGetResponseAsync(); // This could be false in case a change has occurred to a group since the last deltapage. Assert.True((groupDeltaCollectionPage.Value.Count == 0), "groupDeltaCollectionPage has unexpected entry."); @@ -148,7 +148,7 @@ public async Task GroupDeltaLink() // Call with the deltalink. We have to wait since there is some latency between the time that the // group is created and the time when the delta is registered. await Task.Delay(10000); - groupDeltaCollectionPage = await new Microsoft.Graph.Groups.Delta.DeltaRequestBuilder(groupDeltaCollectionPage.OdataDeltaLink,graphClient.RequestAdapter).GetAsync(); + groupDeltaCollectionPage = await new Microsoft.Graph.Groups.Delta.DeltaRequestBuilder(groupDeltaCollectionPage.OdataDeltaLink,graphClient.RequestAdapter).GetAsDeltaGetResponseAsync(); Assert.True((groupDeltaCollectionPage.Value.Count == 1)); diff --git a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/ExcelTests.cs b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/ExcelTests.cs index 9285772aff0..36d3fed6b32 100644 --- a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/ExcelTests.cs +++ b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/ExcelTests.cs @@ -35,7 +35,7 @@ private async Task OneDriveSearchForTestFile(string fileName = "_excelTestResour { // Check that this item hasn't already been created. // https://graph.microsoft.io/en-us/docs/api-reference/v1.0/api/item_search - var searchResults = await graphClient.Drives["driveId"].Items[""].SearchWithQ(fileName).GetAsync(); + var searchResults = await graphClient.Drives["driveId"].Items[""].SearchWithQ(fileName).GetAsSearchWithQGetResponseAsync(); foreach (var r in searchResults.Value) { if (r.Name != fileName) diff --git a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/OneDriveTests.cs b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/OneDriveTests.cs index 3afb1a1213f..0801067cdf5 100644 --- a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/OneDriveTests.cs +++ b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/OneDriveTests.cs @@ -23,7 +23,7 @@ public class OneDriveTests : GraphTestBase public async Task OneDriveSharedWithMe() { - var sharedDriveItems = await graphClient.Drives["driveId"].SharedWithMe.GetAsync(); + var sharedDriveItems = await graphClient.Drives["driveId"].SharedWithMe.GetAsSharedWithMeGetResponseAsync(); var permissionsPage = await graphClient.Drives["driveId"].Items[sharedDriveItems.Value[0].Id].Permissions.GetAsync(); var permissions = new List(); permissions.AddRange(permissionsPage.Value); @@ -232,7 +232,7 @@ public async Task OneDriveSearchFile() try { // http://graph.microsoft.io/en-us/docs/api-reference/v1.0/api/item_search - var driveItems = await graphClient.Drives["driveId"].SearchWithQ("employee services").GetAsync(); + var driveItems = await graphClient.Drives["driveId"].SearchWithQ("employee services").GetAsSearchWithQGetResponseAsync(); // Expecting two results. Assert.Equal(2, driveItems.Value.Count); @@ -313,7 +313,7 @@ public async Task OneDriveInvite() .Root .ItemWithPath(itemToShare.Value[0].Name) .Invite - .PostAsync(invitePostBody); + .PostAsInvitePostResponseAsync(invitePostBody); Assert.Equal("Alex Wilber", inviteCollection.Value[0].GrantedTo.User.DisplayName); } diff --git a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/OneNoteTests.cs b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/OneNoteTests.cs index 1513216bb4c..32eb9954f62 100644 --- a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/OneNoteTests.cs +++ b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/OneNoteTests.cs @@ -343,7 +343,7 @@ public async Task OneNoteAddPageHtmlWorkaround() "Generated from the test "; var requestInformation = graphClient.Me.Onenote.Sections[firstSectionID].Pages.ToPostRequestInformation(null); - requestInformation.SetStreamContent(new MemoryStream(Encoding.UTF8.GetBytes(htmlBody))); + requestInformation.SetStreamContent(new MemoryStream(Encoding.UTF8.GetBytes(htmlBody)),"text/html"); requestInformation.Headers.Add("Content-Type","text/html"); // Send the request and get the response. @@ -406,7 +406,7 @@ public async Task OneNoteAddPageHtmlWithStreamWorkaround() requestInformation.HttpMethod = Method.POST; // Create the request message and add the content. - requestInformation.SetStreamContent(stream); + requestInformation.SetStreamContent(stream,"text/html"); } @@ -477,7 +477,7 @@ public async Task OneNoteAddPageMultipartWorkaround() // Create the request message and add the content. requestInformation.HttpMethod = Method.POST; requestInformation.Headers.Add("Content-Type",contentType); - requestInformation.SetStreamContent(await image.ReadAsStreamAsync()); + requestInformation.SetStreamContent(await image.ReadAsStreamAsync(),"application/octet-stream"); // Deserialize into OneNotePage object. testPage = await graphClient.RequestAdapter.SendAsync(requestInformation,OnenotePage.CreateFromDiscriminatorValue); @@ -547,7 +547,7 @@ public async Task OneNoteUpdatePage() var serializer = new JsonSerializationWriter(); serializer.WriteCollectionOfObjectValues(string.Empty,commands); - requestInformation.SetStreamContent(serializer.GetSerializedContent()); + requestInformation.SetStreamContent(serializer.GetSerializedContent(),"application/octet-stream"); requestInformation.Headers.Add("Content-Type", "application/json"); // Send the request and get the response. @@ -608,7 +608,7 @@ public async Task OneNoteAddPageWithHtml() var requestInformation = graphClient.Me.Onenote.Sections[firstSectionID].Pages.ToGetRequestInformation(); requestInformation.HttpMethod = Method.POST; - requestInformation.SetStreamContent(new MemoryStream(System.Text.Encoding.UTF8.GetBytes(htmlBody))); + requestInformation.SetStreamContent(new MemoryStream(System.Text.Encoding.UTF8.GetBytes(htmlBody)),"application/octet-stream"); requestInformation.Headers.Add("Content-Type","text/html"); testPage = await graphClient.RequestAdapter.SendAsync(requestInformation,OnenotePage.CreateFromDiscriminatorValue); @@ -664,7 +664,7 @@ public async Task OneNoteAddPageWithMultipart() var requestInformation = graphClient.Me.Onenote.Sections[firstSectionID].Pages.ToGetRequestInformation(); requestInformation.HttpMethod = Method.POST; - requestInformation.SetStreamContent(await multiPartContent.ReadAsStreamAsync()); + requestInformation.SetStreamContent(await multiPartContent.ReadAsStreamAsync(),"application/octet-stream"); requestInformation.Headers.Add("Content-Type",contentType); testPage = await graphClient.RequestAdapter.SendAsync(requestInformation,OnenotePage.CreateFromDiscriminatorValue); } diff --git a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/UserActivitiesTests.cs b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/UserActivitiesTests.cs index 1699ec87885..6403db4e26f 100644 --- a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/UserActivitiesTests.cs +++ b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/UserActivitiesTests.cs @@ -145,7 +145,7 @@ public async Task ActivitiesGetRecentActivities() // Get recent user activities //var getRecentResponse = await graphClient.Me.Activities.Recent().GetAsync(requestConfiguration => requestConfiguration.QueryParameters.Expand = new string[] { "historyItems" }); - var getRecentResponse = await graphClient.Me.Activities.Recent.GetAsync(); + var getRecentResponse = await graphClient.Me.Activities.Recent.GetAsRecentGetResponseAsync(); Assert.NotNull(getRecentResponse); diff --git a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/UserTests.cs b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/UserTests.cs index 00d506faffa..dbe3cd483ac 100644 --- a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/UserTests.cs +++ b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/UserTests.cs @@ -36,7 +36,7 @@ public async Task UserGetMailtipsTestEnumFlags() { EmailAddresses = emailAddresses, MailTipsOptions = mailTipsOptions }; - var mailTipsCollectionPage = await graphClient.Me.GetMailTips.PostAsync(requestBody); + var mailTipsCollectionPage = await graphClient.Me.GetMailTips.PostAsGetMailTipsPostResponseAsync(requestBody); foreach (var mt in mailTipsCollectionPage.Value) { @@ -327,7 +327,7 @@ public async Task UserGetMemberGroups_SecurityEnabledOnly_ValueSet() { SecurityEnabledOnly = true }; - var directoryObjectGetMemberGroupsCollectionPage = await getMemberGroupsRequest.PostAsync(requestBody); + var directoryObjectGetMemberGroupsCollectionPage = await getMemberGroupsRequest.PostAsGetMemberGroupsPostResponseAsync(requestBody); Assert.NotNull(directoryObjectGetMemberGroupsCollectionPage); Assert.Equal("POST", getMemberGroupsRequest.ToPostRequestInformation(requestBody).HttpMethod.ToString()); @@ -350,7 +350,7 @@ public async Task UserGetMemberGroups_SecurityEnabledOnly_ValueNotSet() { var getMemberGroupsRequest = graphClient.Me.GetMemberGroups; var requestBody = new GetMemberGroupsPostRequestBody(); - var directoryObjectGetMemberGroupsCollectionPage = await getMemberGroupsRequest.PostAsync(requestBody); + var directoryObjectGetMemberGroupsCollectionPage = await getMemberGroupsRequest.PostAsGetMemberGroupsPostResponseAsync(requestBody); } catch (ODataError e) { diff --git a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/ActionRequestTests.cs b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/ActionRequestTests.cs index 7eab87c87bb..025981070f1 100644 --- a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/ActionRequestTests.cs +++ b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/ActionRequestTests.cs @@ -132,14 +132,14 @@ public async System.Threading.Tasks.Task PostAsync_CollectionOfPrimitivesReturnT "value 2", }; - var checkMemberGroupsCollectionResponse = new CheckMemberGroupsResponse + var checkMemberGroupsCollectionResponse = new CheckMemberGroupsPostResponse { Value = checkMemberGroupsCollectionPage, OdataNextLink = nextPageRequestUrl }; mockRequestAdapter.Setup( - adapter => adapter.SendAsync(It.IsAny(),CheckMemberGroupsResponse.CreateFromDiscriminatorValue, It.IsAny>>(),It.IsAny() ) + adapter => adapter.SendAsync(It.IsAny(),CheckMemberGroupsPostResponse.CreateFromDiscriminatorValue, It.IsAny>>(),It.IsAny() ) ).ReturnsAsync(checkMemberGroupsCollectionResponse); mockRequestAdapter.Setup( @@ -150,7 +150,7 @@ public async System.Threading.Tasks.Task PostAsync_CollectionOfPrimitivesReturnT { GroupIds = new List() }; - var returnedCollectionPage = await graphServiceClient.Me.CheckMemberGroups.PostAsync(requestBody); + var returnedCollectionPage = await graphServiceClient.Me.CheckMemberGroups.PostAsCheckMemberGroupsPostResponseAsync(requestBody); Assert.NotNull(returnedCollectionPage); Assert.Equal(checkMemberGroupsCollectionPage, returnedCollectionPage.Value);