sdk/dotnet/test/Microsoft.Datasync.Client.Test/Table/Operations.RemoteTableOfT/BaseOperationTest.cs
/// <summary>
/// Compares the request content to the required entity.
/// </summary>
/// <param name="request">The request holding the content</param>
/// <param name="expected">The expected entity.</param>
/// <returns></returns>
Compares the request content to the required entity.
Compares the request content to the required entity .
protected static async Task AssertRequestContentMatchesAsync(HttpRequestMessage request, IdEntity expected)
        {
            Assert.Equal("application/json", request.Content.Headers.ContentType.MediaType);
            var content = await request.Content.ReadAsStringAsync();
            var idEntity = JsonSerializer.Deserialize<IdEntity>(content, new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase });
            Assert.Equal(expected, idEntity);
        }
protected static async Task AssertRequestContentMatchesAsync ( HttpRequestMessage request , IdEntity expected ) { Assert . Equal ( " " , request . Content . Headers . ContentType . MediaType ) ; var content = await request . Content . ReadAsStringAsync ( ) ; var idEntity = JsonSerializer . Deserialize < IdEntity > ( content , new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy . CamelCase } ) ; Assert . Equal ( expected , idEntity ) ; }
Compares the request content to the required entity.
Compares the request content to the required entity .
None
request
HttpRequestMessage
The request holding the content
The request holding the content
expected
IdEntity
The expected entity.
The expected entity .