2
2
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3
3
// ------------------------------------------------------------------------------
4
4
5
+ #pragma warning disable CS0618 // Type or member is obsolete Guidance is to use the BatchRequestContentCollection for making batch requests
5
6
namespace Microsoft . Graph . DotnetCore . Core . Test . Requests . Content
6
7
{
7
8
using System ;
@@ -184,7 +185,7 @@ public void BatchRequestContent_RemoveBatchRequestStepWithIdForNonExistingId()
184
185
}
185
186
186
187
[ Fact ]
187
- public async Task BatchRequestContent_NewBatchWithFailedRequests ( )
188
+ public async Task BatchRequestContent_NewBatchWithFailedRequestsAsync ( )
188
189
{
189
190
BatchRequestContentCollection batchRequestContent = new BatchRequestContentCollection ( client ) ;
190
191
var requestIds = new List < string > ( ) ;
@@ -208,7 +209,7 @@ public async Task BatchRequestContent_NewBatchWithFailedRequests()
208
209
}
209
210
210
211
[ Fact ]
211
- public async Task BatchRequestContent_NewBatchWithFailedRequests2 ( )
212
+ public async Task BatchRequestContent_NewBatchWithFailedRequests2Async ( )
212
213
{
213
214
BatchRequestContentCollection batchRequestContent = new BatchRequestContentCollection ( client ) ;
214
215
var requestIds = new List < string > ( ) ;
@@ -230,7 +231,7 @@ public async Task BatchRequestContent_NewBatchWithFailedRequests2()
230
231
}
231
232
232
233
[ Fact ]
233
- public async Task BatchRequestContent_NewBatchWithFailedRequestsWithBody ( )
234
+ public async Task BatchRequestContent_NewBatchWithFailedRequestsWithBodyAsync ( )
234
235
{
235
236
BatchRequestContentCollection batchRequestContent = new BatchRequestContentCollection ( client ) ;
236
237
var requestIds = new List < string > ( ) ;
@@ -311,7 +312,7 @@ public async System.Threading.Tasks.Task BatchRequestContent_GetBatchRequestCont
311
312
}
312
313
313
314
[ Fact ]
314
- public async System . Threading . Tasks . Task BatchRequestContent_GetBatchRequestContentSupportsNonJsonPayload ( )
315
+ public async System . Threading . Tasks . Task BatchRequestContent_GetBatchRequestContentSupportsNonJsonPayloadAsync ( )
315
316
{
316
317
using var fileStream = File . Open ( "ms-logo.png" , FileMode . Open ) ;
317
318
BatchRequestStep batchRequestStep1 = new BatchRequestStep ( "1" , new HttpRequestMessage ( HttpMethod . Get , REQUEST_URL ) ) ;
@@ -364,7 +365,7 @@ public async System.Threading.Tasks.Task BatchRequestContent_GetBatchRequestCont
364
365
}
365
366
366
367
[ Fact ]
367
- public async System . Threading . Tasks . Task BatchRequestContent_GetBatchRequestContentFromStepAsyncDoesNotModifyDateTimes ( )
368
+ public async System . Threading . Tasks . Task BatchRequestContent_GetBatchRequestContentFromStepAsyncDoesNotModifyDateTimesAsync ( )
368
369
{
369
370
// System.Text.Json is strict on json content by default. So make sure that there are no
370
371
// trailing comma's and special characters
@@ -468,7 +469,7 @@ public async System.Threading.Tasks.Task BatchRequestContent_GetBatchRequestCont
468
469
}
469
470
470
471
[ Fact ]
471
- public async Task BatchRequest_GetBathRequestContentAsyncRetainsInsertionOrder ( )
472
+ public async Task BatchRequest_GetBathRequestContentAsyncRetainsInsertionOrderAsync ( )
472
473
{
473
474
BatchRequestStep batchRequestStep1 = new BatchRequestStep ( "1" , new HttpRequestMessage ( HttpMethod . Get , REQUEST_URL ) ) ;
474
475
BatchRequestStep batchRequestStep2 = new BatchRequestStep ( Guid . NewGuid ( ) . ToString ( ) , new HttpRequestMessage ( HttpMethod . Get , REQUEST_URL ) , new List < string > { "1" } ) ;
@@ -537,7 +538,7 @@ public void BatchRequestContent_AddBatchRequestStepWithHttpRequestMessageToBatch
537
538
}
538
539
539
540
[ Fact ]
540
- public async Task BatchRequestContent_AddBatchRequestStepWithBaseRequest ( )
541
+ public async Task BatchRequestContent_AddBatchRequestStepWithBaseRequestAsync ( )
541
542
{
542
543
// Arrange
543
544
RequestInformation requestInformation = new RequestInformation ( ) { HttpMethod = Method . GET , UrlTemplate = REQUEST_URL } ;
@@ -556,7 +557,7 @@ public async Task BatchRequestContent_AddBatchRequestStepWithBaseRequest()
556
557
}
557
558
558
559
[ Fact ]
559
- public async Task BatchRequestContent_AddBatchRequestStepWithBaseRequestWithHeaderOptions ( )
560
+ public async Task BatchRequestContent_AddBatchRequestStepWithBaseRequestWithHeaderOptionsAsync ( )
560
561
{
561
562
// Create a BatchRequestContent from a BaseRequest object
562
563
BatchRequestContent batchRequestContent = new BatchRequestContent ( client ) ;
@@ -593,7 +594,7 @@ public async Task BatchRequestContent_AddBatchRequestStepWithBaseRequestWithHead
593
594
}
594
595
595
596
[ Fact ]
596
- public async Task BatchRequestContent_AddBatchRequestStepWithBaseRequestToBatchRequestContentWithMaxSteps ( )
597
+ public async Task BatchRequestContent_AddBatchRequestStepWithBaseRequestToBatchRequestContentWithMaxStepsAsync ( )
597
598
{
598
599
// Arrange
599
600
BatchRequestContent batchRequestContent = new BatchRequestContent ( client ) ;
@@ -623,7 +624,7 @@ public async Task BatchRequestContent_AddBatchRequestStepWithBaseRequestToBatchR
623
624
[ InlineData ( "https://graph.microsoft.com/beta/users/abcbeta123@wonderemail.com/events" , "/users/abcbeta123@wonderemail.com/events" ) ]
624
625
[ InlineData ( "https://graph.microsoft.com/v1.0/users?$filter=identities/any(id:id/issuer%20eq%20'$74707853-18b3-411f-ad57-2ef65f6fdeb0'%20and%20id/issuerAssignedId%20eq%20'**bobbetancourt@fakeemail.com**')" , "/users?$filter=identities/any(id:id/issuer eq '$74707853-18b3-411f-ad57-2ef65f6fdeb0' and id/issuerAssignedId eq '**bobbetancourt@fakeemail.com**')" ) ]
625
626
[ InlineData ( "https://graph.microsoft.com/beta/users?$filter=identities/any(id:id/issuer%20eq%20'$74707853-18b3-411f-ad57-2ef65f6fdeb0'%20and%20id/issuerAssignedId%20eq%20'**bobbetancourt@fakeemail.com**')&$top=1" , "/users?$filter=identities/any(id:id/issuer eq '$74707853-18b3-411f-ad57-2ef65f6fdeb0' and id/issuerAssignedId eq '**bobbetancourt@fakeemail.com**')&$top=1" ) ]
626
- public async Task BatchRequestContent_AddBatchRequestStepWithBaseRequestProperlySetsVersion ( string requestUrl , string expectedUrl )
627
+ public async Task BatchRequestContent_AddBatchRequestStepWithBaseRequestProperlySetsVersionAsync ( string requestUrl , string expectedUrl )
627
628
{
628
629
// Arrange
629
630
BatchRequestStep batchRequestStep = new BatchRequestStep ( "1" , new HttpRequestMessage ( HttpMethod . Get , requestUrl ) ) ;
@@ -647,7 +648,7 @@ public async Task BatchRequestContent_AddBatchRequestStepWithBaseRequestProperly
647
648
648
649
[ Theory ]
649
650
[ InlineData ( "https://graph.microsoft.com/v1.0/drives/b%21ynG/items/74707853-18b3-411f-ad57-2ef65f6fdeb0:/test.txt:/textfilecontentbytes" , "/drives/b!ynG/items/74707853-18b3-411f-ad57-2ef65f6fdeb0:/test.txt:/textfilecontentbytes" ) ]
650
- public async Task BatchRequestContent_AddBatchRequestPutStepWithBaseRequestProperlyEncodedURI ( string requestUrl , string expectedUrl )
651
+ public async Task BatchRequestContent_AddBatchRequestPutStepWithBaseRequestProperlyEncodedURIAsync ( string requestUrl , string expectedUrl )
651
652
{
652
653
// Arrange
653
654
BatchRequestStep batchRequestStep = new BatchRequestStep ( "1" , new HttpRequestMessage ( HttpMethod . Put , requestUrl ) ) ;
0 commit comments