diff --git a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Extensions/DriveItemRequestBuilderExtensionsTests.cs b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Extensions/DriveItemRequestBuilderExtensionsTests.cs
index 36e83a8b3b1..f336241ff0a 100644
--- a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Extensions/DriveItemRequestBuilderExtensionsTests.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Extensions/DriveItemRequestBuilderExtensionsTests.cs
@@ -17,7 +17,7 @@ public void ItemById_BuildRequest()
{
var graphServiceClient = new GraphServiceClient(new MockAuthenticationProvider().Object);
var expectedRequestUri = new Uri(string.Format(Constants.Url.GraphBaseUrlFormatString, "beta") + "/drives/driveId/items/id");
- var itemRequestInformation = graphServiceClient.Drives["driveId"].Items["id"].CreateGetRequestInformation();
+ var itemRequestInformation = graphServiceClient.Drives["driveId"].Items["id"].ToGetRequestInformation();
itemRequestInformation.PathParameters.Add("baseurl", graphServiceClient.RequestAdapter.BaseUrl);
Assert.NotNull(itemRequestInformation);
@@ -29,7 +29,7 @@ public void ItemByPath_BuildRequest()
{
var graphServiceClient = new GraphServiceClient(new MockAuthenticationProvider().Object);
var expectedRequestUri = new Uri(string.Format(Constants.Url.GraphBaseUrlFormatString, "beta") + "/drives/driveId/root:/item/with/path:");
- var itemRequestInformation = graphServiceClient.Drives["driveId"].Root.ItemWithPath("item/with/path").CreateGetRequestInformation();
+ var itemRequestInformation = graphServiceClient.Drives["driveId"].Root.ItemWithPath("item/with/path").ToGetRequestInformation();
itemRequestInformation.PathParameters.Add("baseurl", graphServiceClient.RequestAdapter.BaseUrl);
Assert.NotNull(itemRequestInformation);
@@ -41,7 +41,7 @@ public void ItemByPath_BuildRequest2()
{
var graphServiceClient = new GraphServiceClient(new MockAuthenticationProvider().Object);
var expectedRequestUri = new Uri(string.Format(Constants.Url.GraphBaseUrlFormatString, "beta") + "/drives/driveId/items/itemId:/item/with/path:");
- var itemRequestInformation = graphServiceClient.Drives["driveId"].Items["itemId"].ItemWithPath("item/with/path").CreateGetRequestInformation();
+ var itemRequestInformation = graphServiceClient.Drives["driveId"].Items["itemId"].ItemWithPath("item/with/path").ToGetRequestInformation();
itemRequestInformation.PathParameters.Add("baseurl", graphServiceClient.RequestAdapter.BaseUrl);
Assert.NotNull(itemRequestInformation);
@@ -53,7 +53,7 @@ public void ItemByPath_BuildRequestWithLeadingSlash()
{
var graphServiceClient = new GraphServiceClient(new MockAuthenticationProvider().Object);
var expectedRequestUri = new Uri(string.Format(Constants.Url.GraphBaseUrlFormatString, "beta") + "/drives/driveId/root:/item/with/path:");
- var itemRequestInformation = graphServiceClient.Drives["driveId"].Root.ItemWithPath("/item/with/path").CreateGetRequestInformation();
+ var itemRequestInformation = graphServiceClient.Drives["driveId"].Root.ItemWithPath("/item/with/path").ToGetRequestInformation();
itemRequestInformation.PathParameters.Add("baseurl", graphServiceClient.RequestAdapter.BaseUrl);
Assert.NotNull(itemRequestInformation);
@@ -74,7 +74,7 @@ public void ItemByPath_BuildRequestWithSpecialPoundCharacter(string pathInput, s
{
var graphServiceClient = new GraphServiceClient(new MockAuthenticationProvider().Object);
var expectedRequestUri = new Uri(string.Format(Constants.Url.GraphBaseUrlFormatString, "beta") + "/drives/driveId/root:/" + expectedEncodedPath + ":");
- var itemRequestInformation = graphServiceClient.Drives["driveId"].Root.ItemWithPath(pathInput).CreateGetRequestInformation();
+ var itemRequestInformation = graphServiceClient.Drives["driveId"].Root.ItemWithPath(pathInput).ToGetRequestInformation();
itemRequestInformation.PathParameters.Add("baseurl", graphServiceClient.RequestAdapter.BaseUrl);
Assert.NotNull(itemRequestInformation);
diff --git a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Extensions/MailFolderMessagesCollectionRequestBuilderExtensionsTests.cs b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Extensions/MailFolderMessagesCollectionRequestBuilderExtensionsTests.cs
index bec5585a4f0..b9ea8b393f6 100644
--- a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Extensions/MailFolderMessagesCollectionRequestBuilderExtensionsTests.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Extensions/MailFolderMessagesCollectionRequestBuilderExtensionsTests.cs
@@ -16,7 +16,7 @@ public void DeletedItems()
{
var graphServiceClient = new GraphServiceClient(new MockAuthenticationProvider().Object);
var expectedRequestUri = new Uri(string.Format(Constants.Url.GraphBaseUrlFormatString, "beta") + "/me/mailFolders/DeletedItems");
- var mailFolderRequestInformation = graphServiceClient.Me.MailFolders["DeletedItems"].CreateGetRequestInformation();
+ var mailFolderRequestInformation = graphServiceClient.Me.MailFolders["DeletedItems"].ToGetRequestInformation();
mailFolderRequestInformation.PathParameters.Add("baseurl", graphServiceClient.RequestAdapter.BaseUrl);
Assert.NotNull(mailFolderRequestInformation);
@@ -28,7 +28,7 @@ public void Drafts()
{
var graphServiceClient = new GraphServiceClient(new MockAuthenticationProvider().Object);
var expectedRequestUri = new Uri(string.Format(Constants.Url.GraphBaseUrlFormatString, "beta") + "/me/mailFolders/Drafts");
- var mailFolderRequestInformation = graphServiceClient.Me.MailFolders["Drafts"].CreateGetRequestInformation();
+ var mailFolderRequestInformation = graphServiceClient.Me.MailFolders["Drafts"].ToGetRequestInformation();
mailFolderRequestInformation.PathParameters.Add("baseurl", graphServiceClient.RequestAdapter.BaseUrl);
Assert.NotNull(mailFolderRequestInformation);
@@ -40,7 +40,7 @@ public void Inbox()
{
var graphServiceClient = new GraphServiceClient(new MockAuthenticationProvider().Object);
var expectedRequestUri = new Uri(string.Format(Constants.Url.GraphBaseUrlFormatString, "beta") + "/me/mailFolders/Inbox");
- var mailFolderRequestInformation = graphServiceClient.Me.MailFolders["Inbox"].CreateGetRequestInformation();
+ var mailFolderRequestInformation = graphServiceClient.Me.MailFolders["Inbox"].ToGetRequestInformation();
mailFolderRequestInformation.PathParameters.Add("baseurl", graphServiceClient.RequestAdapter.BaseUrl);
Assert.NotNull(mailFolderRequestInformation);
@@ -52,7 +52,7 @@ public void SentItems()
{
var graphServiceClient = new GraphServiceClient(new MockAuthenticationProvider().Object);
var expectedRequestUri = new Uri(string.Format(Constants.Url.GraphBaseUrlFormatString, "beta") + "/me/mailFolders/SentItems");
- var mailFolderRequestInformation = graphServiceClient.Me.MailFolders["SentItems"].CreateGetRequestInformation();
+ var mailFolderRequestInformation = graphServiceClient.Me.MailFolders["SentItems"].ToGetRequestInformation();
mailFolderRequestInformation.PathParameters.Add("baseurl", graphServiceClient.RequestAdapter.BaseUrl);
Assert.NotNull(mailFolderRequestInformation);
diff --git a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/OneNoteTests.cs b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/OneNoteTests.cs
index 7c9569e732b..8326d72fa5c 100644
--- a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/OneNoteTests.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/OneNoteTests.cs
@@ -341,7 +341,7 @@ public async Task OneNoteAddPageHtmlWorkaround()
string htmlBody = $"
{title}" +
"Generated from the test ";
- var requestInformation = graphClient.Me.Onenote.Sections[firstSectionID].Pages.CreatePostRequestInformation(null);
+ var requestInformation = graphClient.Me.Onenote.Sections[firstSectionID].Pages.ToPostRequestInformation(null);
requestInformation.SetStreamContent(new MemoryStream(Encoding.UTF8.GetBytes(htmlBody)));
requestInformation.Headers.Add("Content-Type","text/html");
@@ -396,7 +396,7 @@ public async Task OneNoteAddPageHtmlWithStreamWorkaround()
{
// Get the request URL for adding a page. You don't have to use the request builder to
// get the URL. We use it here for convenience.
- var requestInformation = graphClient.Me.Onenote.Sections[firstSectionID].Pages.CreateGetRequestInformation();
+ var requestInformation = graphClient.Me.Onenote.Sections[firstSectionID].Pages.ToGetRequestInformation();
// Create the request body.
string title = "OneNoteAddPageHtmlWithStream test created this";
@@ -448,7 +448,7 @@ public async Task OneNoteAddPageMultipartWorkaround()
try
{
// Get the request URL for adding a page.
- var requestInformation = graphClient.Me.Onenote.Sections[firstSectionID].Pages.CreateGetRequestInformation();
+ var requestInformation = graphClient.Me.Onenote.Sections[firstSectionID].Pages.ToGetRequestInformation();
string title = "OneNoteAddPageMultipart test created this";
string htmlBody = $@"{title}
Generated from the test
@@ -528,7 +528,7 @@ public async Task OneNoteUpdatePage()
string pageId = pageCollection.Value[0].Id;
// URL to update a page. https://graph.microsoft.com/v1.0/me/onenote/sections/{id}/pages/{id}/content
- var requestInformation = graphClient.Me.Onenote.Pages[pageId].Content.CreateGetRequestInformation();
+ var requestInformation = graphClient.Me.Onenote.Pages[pageId].Content.ToGetRequestInformation();
// Create the patch command to update thebody of the OneNote page.
OnenotePatchContentCommand updateBodyCommand = new OnenotePatchContentCommand() {
@@ -585,7 +585,7 @@ public async Task OneNoteCreatePageWithHtmlStream()
{
// Create a OneNote page.
var requestInformation =
- graphClient.Me.Onenote.Sections[firstSectionID].Pages.CreateGetRequestInformation();
+ graphClient.Me.Onenote.Sections[firstSectionID].Pages.ToGetRequestInformation();
requestInformation.HttpMethod = Method.POST;
requestInformation.Headers.Add("Content-Type","text/html");
testPage = await graphClient.RequestAdapter.SendAsync(requestInformation,OnenotePage.CreateFromDiscriminatorValue);
@@ -610,7 +610,7 @@ public async Task OneNoteAddPageWithHtml()
"Generated from the test with the partial ";
var requestInformation =
- graphClient.Me.Onenote.Sections[firstSectionID].Pages.CreateGetRequestInformation();
+ graphClient.Me.Onenote.Sections[firstSectionID].Pages.ToGetRequestInformation();
requestInformation.HttpMethod = Method.POST;
requestInformation.SetStreamContent(new MemoryStream(System.Text.Encoding.UTF8.GetBytes(htmlBody)));
requestInformation.Headers.Add("Content-Type","text/html");
@@ -666,7 +666,7 @@ public async Task OneNoteAddPageWithMultipart()
// Get the multiPart stream and then send the request to add a page using the stream.
var requestInformation =
- graphClient.Me.Onenote.Sections[firstSectionID].Pages.CreateGetRequestInformation();
+ graphClient.Me.Onenote.Sections[firstSectionID].Pages.ToGetRequestInformation();
requestInformation.HttpMethod = Method.POST;
requestInformation.SetStreamContent(await multiPartContent.ReadAsStreamAsync());
requestInformation.Headers.Add("Content-Type",contentType);
diff --git a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/ReportTests.cs b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/ReportTests.cs
index e01e71d0a0b..40ef2b9263e 100644
--- a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/ReportTests.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/ReportTests.cs
@@ -20,7 +20,7 @@ public async Task ReportingGetUserCounts()
try
{
// Create the request message.
- var getOffice365ActiveUserCountsRequest = graphClient.Reports.GetOffice365ActiveUserCountsWithPeriod("D7").CreateGetRequestInformation();
+ var getOffice365ActiveUserCountsRequest = graphClient.Reports.GetOffice365ActiveUserCountsWithPeriod("D7").ToGetRequestInformation();
// Send the request and get the response. It will automatically follow the redirect to get the Report file.
var responseStream = await graphClient.RequestAdapter.SendPrimitiveAsync(getOffice365ActiveUserCountsRequest);
diff --git a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/UserTests.cs b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/UserTests.cs
index 20e30945f0a..83a2e6bc0dc 100644
--- a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/UserTests.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Functional/UserTests.cs
@@ -328,7 +328,7 @@ public async Task UserGetMemberGroups_SecurityEnabledOnly_ValueSet()
var directoryObjectGetMemberGroupsCollectionPage = await getMemberGroupsRequest.PostAsync(requestBody);
Assert.NotNull(directoryObjectGetMemberGroupsCollectionPage);
- Assert.Equal("POST", getMemberGroupsRequest.CreatePostRequestInformation(requestBody).HttpMethod.ToString());
+ Assert.Equal("POST", getMemberGroupsRequest.ToPostRequestInformation(requestBody).HttpMethod.ToString());
Assert.True(requestBody.SecurityEnabledOnly.Value);
}
catch (Microsoft.Graph.ServiceException e)
diff --git a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/ActionRequestTests.cs b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/ActionRequestTests.cs
index 40ee1ed32e9..9d557251d83 100644
--- a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/ActionRequestTests.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/ActionRequestTests.cs
@@ -45,7 +45,7 @@ public void MultipleRequiredParameters()
RemoveLicenses = new ()
};
- var requestInformation = graphServiceClient.Me.AssignLicense.CreatePostRequestInformation(requestBody);
+ var requestInformation = graphServiceClient.Me.AssignLicense.ToPostRequestInformation(requestBody);
requestInformation.PathParameters.Add("baseurl", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
Assert.NotNull(requestInformation);
@@ -67,7 +67,7 @@ public void OptionalParameterWithNonNullableType_NullValue()
).Returns(new JsonSerializationWriter());
var requestBody = new GetMemberGroupsPostRequestBody { };
- var requestInformation = graphServiceClient.Me.GetMemberGroups.CreatePostRequestInformation(requestBody);
+ var requestInformation = graphServiceClient.Me.GetMemberGroups.ToPostRequestInformation(requestBody);
requestInformation.PathParameters.Add("baseurl", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
Assert.NotNull(requestInformation);
@@ -90,7 +90,7 @@ public void OptionalParameterWithNonNullableType_ValueSet()
).Returns(new JsonSerializationWriter());
var requestBody = new GetMemberGroupsPostRequestBody { SecurityEnabledOnly = true};
- var requestInformation = graphServiceClient.Me.GetMemberGroups.CreatePostRequestInformation(requestBody);
+ var requestInformation = graphServiceClient.Me.GetMemberGroups.ToPostRequestInformation(requestBody);
requestInformation.PathParameters.Add("baseurl", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
Assert.NotNull(requestInformation);
@@ -109,7 +109,7 @@ public void NoParameters()
var messageId = "messageId";
var expectedRequestUrl = string.Format("{0}/me/mailFolders/Drafts/messages/{1}/microsoft.graph.send", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"), messageId);
- var requestInformation = graphServiceClient.Me.MailFolders["Drafts"].Messages[messageId].Send.CreatePostRequestInformation();
+ var requestInformation = graphServiceClient.Me.MailFolders["Drafts"].Messages[messageId].Send.ToPostRequestInformation();
requestInformation.PathParameters.Add("baseurl", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
Assert.NotNull(requestInformation);
diff --git a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/CollectionReferencesRequestTests.cs b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/CollectionReferencesRequestTests.cs
index 00ebc8614be..c13cfaeb09d 100644
--- a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/CollectionReferencesRequestTests.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/CollectionReferencesRequestTests.cs
@@ -28,7 +28,7 @@ public void BuildRequest()
var mockRequestAdapter = new Mock();
var graphServiceClient = new GraphServiceClient(mockRequestAdapter.Object);
var expectedRequestUri = new Uri(string.Format(Constants.Url.GraphBaseUrlFormatString, "beta") + "/groups/groupId/members/$ref");
- var requestInformation = graphServiceClient.Groups["groupId"].Members.Ref.CreateGetRequestInformation();
+ var requestInformation = graphServiceClient.Groups["groupId"].Members.Ref.ToGetRequestInformation();
requestInformation.PathParameters.Add("baseurl", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
Assert.NotNull(requestInformation);
@@ -94,7 +94,7 @@ public void Top()
var graphServiceClient = new GraphServiceClient(mockRequestAdapter.Object);
var expectedRequestUrl = string.Format("{0}/groups/groupId/members?%24top=1", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
- var requestInformation = graphServiceClient.Groups["groupId"].Members.CreateGetRequestInformation(requestConfiguration => requestConfiguration.QueryParameters.Top = 1);
+ var requestInformation = graphServiceClient.Groups["groupId"].Members.ToGetRequestInformation(requestConfiguration => requestConfiguration.QueryParameters.Top = 1);
requestInformation.PathParameters.Add("baseurl", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
Assert.NotNull(requestInformation);
@@ -112,7 +112,7 @@ public void OrderBy()
var expectedRequestUrl = string.Format("{0}/groups/groupId/members?%24orderby=value", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
var requestInformation = graphServiceClient.Groups["groupId"].Members
- .CreateGetRequestInformation(requestConfiguration =>
+ .ToGetRequestInformation(requestConfiguration =>
requestConfiguration.QueryParameters.Orderby = new[] { "value" });
requestInformation.PathParameters.Add("baseurl", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
diff --git a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/CollectionWithReferencesRequestTests.cs b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/CollectionWithReferencesRequestTests.cs
index d15738f07ab..38d408b9415 100644
--- a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/CollectionWithReferencesRequestTests.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/CollectionWithReferencesRequestTests.cs
@@ -26,7 +26,7 @@ public void BuildRequest()
{
var graphServiceClient = new GraphServiceClient(new MockAuthenticationProvider().Object);
var expectedRequestUri = new Uri(string.Format(Constants.Url.GraphBaseUrlFormatString, "beta") + "/groups/groupId/members");
- var requestInformation = graphServiceClient.Groups["groupId"].Members.CreateGetRequestInformation();
+ var requestInformation = graphServiceClient.Groups["groupId"].Members.ToGetRequestInformation();
requestInformation.PathParameters.Add("baseurl", graphServiceClient.RequestAdapter.BaseUrl);
Assert.NotNull(requestInformation);
@@ -84,7 +84,7 @@ public void Top()
var graphServiceClient = new GraphServiceClient(mockRequestAdapter.Object);
var expectedRequestUrl = string.Format("{0}/groups/groupId/members?%24top=1", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
- var requestInformation = graphServiceClient.Groups["groupId"].Members.CreateGetRequestInformation( requestConfiguration => requestConfiguration.QueryParameters.Top = 1);
+ var requestInformation = graphServiceClient.Groups["groupId"].Members.ToGetRequestInformation( requestConfiguration => requestConfiguration.QueryParameters.Top = 1);
requestInformation.PathParameters.Add("baseurl", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
Assert.NotNull(requestInformation);
diff --git a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/EntityCollectionRequestTests.cs b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/EntityCollectionRequestTests.cs
index acd5e57d8ac..3e4bb462ea5 100644
--- a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/EntityCollectionRequestTests.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/EntityCollectionRequestTests.cs
@@ -27,7 +27,7 @@ public void BuildRequest()
var mockRequestAdapter = new Mock();
var graphServiceClient = new GraphServiceClient(mockRequestAdapter.Object);
var expectedRequestUri = new Uri(string.Format(Constants.Url.GraphBaseUrlFormatString, "beta") + "/me/calendars");
- var requestInformation = graphServiceClient.Me.Calendars.CreateGetRequestInformation();
+ var requestInformation = graphServiceClient.Me.Calendars.ToGetRequestInformation();
requestInformation.PathParameters.Add("baseurl", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
Assert.NotNull(requestInformation);
@@ -144,7 +144,7 @@ public void Expand()
var expectedRequestUrl = string.Format("{0}/me/contactFolders?%24select=contacts", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
- var requestInformation = graphServiceClient.Me.ContactFolders.CreateGetRequestInformation( requestConfiguration => requestConfiguration.QueryParameters.Select = new []{"contacts"});
+ var requestInformation = graphServiceClient.Me.ContactFolders.ToGetRequestInformation( requestConfiguration => requestConfiguration.QueryParameters.Select = new []{"contacts"});
requestInformation.PathParameters.Add("baseurl", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
Assert.NotNull(requestInformation);
@@ -161,7 +161,7 @@ public void Select()
var graphServiceClient = new GraphServiceClient(mockRequestAdapter.Object);
var expectedRequestUrl = string.Format("{0}/me/contactFolders?%24select=value", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
- var requestInformation = graphServiceClient.Me.ContactFolders.CreateGetRequestInformation( requestConfiguration => requestConfiguration.QueryParameters.Select = new []{"value"});
+ var requestInformation = graphServiceClient.Me.ContactFolders.ToGetRequestInformation( requestConfiguration => requestConfiguration.QueryParameters.Select = new []{"value"});
requestInformation.PathParameters.Add("baseurl", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
Assert.NotNull(requestInformation);
@@ -178,7 +178,7 @@ public void Top()
var graphServiceClient = new GraphServiceClient(mockRequestAdapter.Object);
var expectedRequestUrl = string.Format("{0}/me/contactFolders?%24top=1", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
- var requestInformation = graphServiceClient.Me.ContactFolders.CreateGetRequestInformation( requestConfiguration => requestConfiguration.QueryParameters.Top = 1);
+ var requestInformation = graphServiceClient.Me.ContactFolders.ToGetRequestInformation( requestConfiguration => requestConfiguration.QueryParameters.Top = 1);
requestInformation.PathParameters.Add("baseurl", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
Assert.NotNull(requestInformation);
@@ -195,7 +195,7 @@ public void Filter()
var graphServiceClient = new GraphServiceClient(mockRequestAdapter.Object);
var expectedRequestUrl = string.Format("{0}/me/contactFolders?%24filter=value", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
- var requestInformation = graphServiceClient.Me.ContactFolders.CreateGetRequestInformation( requestConfiguration => requestConfiguration.QueryParameters.Filter = "value");
+ var requestInformation = graphServiceClient.Me.ContactFolders.ToGetRequestInformation( requestConfiguration => requestConfiguration.QueryParameters.Filter = "value");
requestInformation.PathParameters.Add("baseurl", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
Assert.NotNull(requestInformation);
@@ -212,7 +212,7 @@ public void Skip()
var graphServiceClient = new GraphServiceClient(mockRequestAdapter.Object);
var expectedRequestUrl = string.Format("{0}/me/contactFolders?%24skip=2", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
- var requestInformation = graphServiceClient.Me.ContactFolders.CreateGetRequestInformation( requestConfiguration => requestConfiguration.QueryParameters.Skip = 2);
+ var requestInformation = graphServiceClient.Me.ContactFolders.ToGetRequestInformation( requestConfiguration => requestConfiguration.QueryParameters.Skip = 2);
requestInformation.PathParameters.Add("baseurl", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
Assert.NotNull(requestInformation);
@@ -229,7 +229,7 @@ public void OrderBy()
var graphServiceClient = new GraphServiceClient(mockRequestAdapter.Object);
var expectedRequestUrl = string.Format("{0}/me/contactFolders?%24orderby=value", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
- var requestInformation = graphServiceClient.Me.ContactFolders.CreateGetRequestInformation( requestConfiguration => requestConfiguration.QueryParameters.Orderby = new []{"value"});
+ var requestInformation = graphServiceClient.Me.ContactFolders.ToGetRequestInformation( requestConfiguration => requestConfiguration.QueryParameters.Orderby = new []{"value"});
requestInformation.PathParameters.Add("baseurl", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
Assert.NotNull(requestInformation);
diff --git a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/EntityReferenceRequestTests.cs b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/EntityReferenceRequestTests.cs
index b4393eb43e9..45d897e672f 100644
--- a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/EntityReferenceRequestTests.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/EntityReferenceRequestTests.cs
@@ -25,7 +25,7 @@ public void BuildRequest()
var mockRequestAdapter = new Mock();
var graphServiceClient = new GraphServiceClient(mockRequestAdapter.Object);
var expectedRequestUri = new Uri(string.Format(Constants.Url.GraphBaseUrlFormatString, "beta") + "/groups/groupId/members/memberId/$ref");
- var requestInformation = graphServiceClient.Groups["groupId"].Members["memberId"].Ref.CreateDeleteRequestInformation();
+ var requestInformation = graphServiceClient.Groups["groupId"].Members["memberId"].Ref.ToDeleteRequestInformation();
requestInformation.PathParameters.Add("baseurl", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
Assert.NotNull(requestInformation);
diff --git a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/EntityRequestTests.cs b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/EntityRequestTests.cs
index c7ffcdaa1da..65ca6e4dcf2 100644
--- a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/EntityRequestTests.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/EntityRequestTests.cs
@@ -1,4 +1,4 @@
-// ------------------------------------------------------------------------------
+// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
@@ -67,7 +67,7 @@ public void Expand()
var mockRequestAdapter = new Mock();
var graphServiceClient = new GraphServiceClient(mockRequestAdapter.Object);
var expectedRequestUri = new Uri(string.Format(Constants.Url.GraphBaseUrlFormatString, "beta") + "/drives/driveId/items/id?%24expand=value");
- var requestInformation = graphServiceClient.Drives["driveId"].Items["id"].CreateGetRequestInformation( requestConfiguration => requestConfiguration.QueryParameters.Expand = new []{"value"});
+ var requestInformation = graphServiceClient.Drives["driveId"].Items["id"].ToGetRequestInformation( requestConfiguration => requestConfiguration.QueryParameters.Expand = new []{"value"});
requestInformation.PathParameters.Add("baseurl", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
Assert.NotNull(requestInformation);
@@ -80,7 +80,7 @@ public void Select()
var mockRequestAdapter = new Mock();
var graphServiceClient = new GraphServiceClient(mockRequestAdapter.Object);
var expectedRequestUri = new Uri(string.Format(Constants.Url.GraphBaseUrlFormatString, "beta") + "/drives/driveId/items/id?%24select=value");
- var requestInformation = graphServiceClient.Drives["driveId"].Items["id"].CreateGetRequestInformation( requestConfiguration => requestConfiguration.QueryParameters.Select = new []{"value"});
+ var requestInformation = graphServiceClient.Drives["driveId"].Items["id"].ToGetRequestInformation( requestConfiguration => requestConfiguration.QueryParameters.Select = new []{"value"});
requestInformation.PathParameters.Add("baseurl", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
Assert.NotNull(requestInformation);
diff --git a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/EntityWithReferenceRequestTests.cs b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/EntityWithReferenceRequestTests.cs
index f423c450e74..1dcd3dc6e1f 100644
--- a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/EntityWithReferenceRequestTests.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/EntityWithReferenceRequestTests.cs
@@ -26,7 +26,7 @@ public void BuildRequest()
var mockRequestAdapter = new Mock();
var graphServiceClient = new GraphServiceClient(mockRequestAdapter.Object);
var expectedRequestUri = new Uri(string.Format(Constants.Url.GraphBaseUrlFormatString, "beta") + "/me/manager");
- var requestInformation = graphServiceClient.Me.Manager.CreateGetRequestInformation();
+ var requestInformation = graphServiceClient.Me.Manager.ToGetRequestInformation();
requestInformation.PathParameters.Add("baseurl", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
Assert.NotNull(requestInformation);
diff --git a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/FunctionRequestTests.cs b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/FunctionRequestTests.cs
index 79ca08914d3..0d75aced74f 100644
--- a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/FunctionRequestTests.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/FunctionRequestTests.cs
@@ -1,4 +1,4 @@
-// ------------------------------------------------------------------------------
+// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
@@ -22,7 +22,7 @@ public void NoParameters()
var graphServiceClient = new GraphServiceClient(mockRequestAdapter.Object);
var expectedRequestUrl = string.Format("{0}/drives/id/root/microsoft.graph.delta()", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
- var requestInformation = graphServiceClient.Drives["id"].Root.Delta().CreateGetRequestInformation();
+ var requestInformation = graphServiceClient.Drives["id"].Root.Delta().ToGetRequestInformation();
requestInformation.PathParameters.Add("baseurl", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
Assert.NotNull(requestInformation);
@@ -42,7 +42,7 @@ public void OptionalParameter_ParameterSet()
var methodBaseUrl = string.Format("{0}/drives/id/root/microsoft.graph.search", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
var expectedRequestUrl = string.Format("{0}(q='{1}')", methodBaseUrl, q);
- var requestInformation = graphServiceClient.Drives["id"].Root.SearchWithQ(q).CreateGetRequestInformation();
+ var requestInformation = graphServiceClient.Drives["id"].Root.SearchWithQ(q).ToGetRequestInformation();
requestInformation.PathParameters.Add("baseurl", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
Assert.NotNull(requestInformation);
@@ -63,7 +63,7 @@ public void RequiredAndOptionalParameters_AllParametersSet()
var methodBaseUrl = string.Format("{0}/me/microsoft.graph.reminderView", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
var expectedRequestUrl = string.Format("{0}(StartDateTime='{2}',EndDateTime='{1}')", methodBaseUrl, startDateTime, endDateTime);
- var requestInformation = graphServiceClient.Me.ReminderViewWithStartDateTimeWithEndDateTime(startDateTime, endDateTime).CreateGetRequestInformation();
+ var requestInformation = graphServiceClient.Me.ReminderViewWithStartDateTimeWithEndDateTime(startDateTime, endDateTime).ToGetRequestInformation();
requestInformation.PathParameters.Add("baseurl", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
Assert.NotNull(requestInformation);
@@ -103,7 +103,7 @@ public void Top()
var graphServiceClient = new GraphServiceClient(mockRequestAdapter.Object);
var expectedRequestUrl = string.Format("{0}/me/microsoft.graph.reminderView(StartDateTime='now',EndDateTime='then')?%24top=1", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
- var requestInformation = graphServiceClient.Me.ReminderViewWithStartDateTimeWithEndDateTime("then","now").CreateGetRequestInformation( requestConfiguration =>requestConfiguration.QueryParameters.Top =1 );
+ var requestInformation = graphServiceClient.Me.ReminderViewWithStartDateTimeWithEndDateTime("then","now").ToGetRequestInformation( requestConfiguration =>requestConfiguration.QueryParameters.Top =1 );
requestInformation.PathParameters.Add("baseurl", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
Assert.NotNull(requestInformation);
@@ -120,7 +120,7 @@ public void Skip()
var graphServiceClient = new GraphServiceClient(mockRequestAdapter.Object);
var expectedRequestUrl = string.Format("{0}/me/microsoft.graph.reminderView(StartDateTime='now',EndDateTime='then')?%24skip=1", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
- var requestInformation = graphServiceClient.Me.ReminderViewWithStartDateTimeWithEndDateTime("then","now").CreateGetRequestInformation( requestConfiguration =>requestConfiguration.QueryParameters.Skip =1 );
+ var requestInformation = graphServiceClient.Me.ReminderViewWithStartDateTimeWithEndDateTime("then","now").ToGetRequestInformation( requestConfiguration =>requestConfiguration.QueryParameters.Skip =1 );
requestInformation.PathParameters.Add("baseurl", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
Assert.NotNull(requestInformation);
diff --git a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/MediaEntityStreamRequestTests.cs b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/MediaEntityStreamRequestTests.cs
index 7334f73a533..f6113a1ef84 100644
--- a/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/MediaEntityStreamRequestTests.cs
+++ b/tests/Microsoft.Graph.DotnetCore.Test/Requests/Generated/MediaEntityStreamRequestTests.cs
@@ -24,7 +24,7 @@ public void RequestBuilder()
var mockRequestAdapter = new Mock();
var graphServiceClient = new GraphServiceClient(mockRequestAdapter.Object);
var expectedRequestUri = new Uri(string.Format(Constants.Url.GraphBaseUrlFormatString, "beta") + "/me/photo/$value");
- var requestInformation = graphServiceClient.Me.Photo.Content.CreateGetRequestInformation();
+ var requestInformation = graphServiceClient.Me.Photo.Content.ToGetRequestInformation();
requestInformation.PathParameters.Add("baseurl", string.Format(Constants.Url.GraphBaseUrlFormatString, "beta"));
Assert.NotNull(requestInformation);
@@ -64,7 +64,7 @@ public async System.Threading.Tasks.Task PutAsync()
var responseHandler = new NativeResponseHandler(){ Value = httpResponseMessage };
using var contentStream = new MemoryStream();
- var requestInformation = graphServiceClient.Me.Photo.Content.CreatePutRequestInformation(contentStream);
+ var requestInformation = graphServiceClient.Me.Photo.Content.ToPutRequestInformation(contentStream);
requestInformation.SetResponseHandler(responseHandler);
await graphServiceClient.RequestAdapter.SendPrimitiveAsync(requestInformation);