From c8c7825c94aa3c83f0f6403b04adab79ef6a4b84 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Fri, 19 Jul 2019 06:00:38 -0700 Subject: [PATCH] Fixup test broken during dependency update (#12336) --- .../ServerExecutionTests/InteropReliabilityTests.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Components/test/E2ETest/ServerExecutionTests/InteropReliabilityTests.cs b/src/Components/test/E2ETest/ServerExecutionTests/InteropReliabilityTests.cs index a4dce84268..35c41f45a7 100644 --- a/src/Components/test/E2ETest/ServerExecutionTests/InteropReliabilityTests.cs +++ b/src/Components/test/E2ETest/ServerExecutionTests/InteropReliabilityTests.cs @@ -404,7 +404,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests await Client.HubConnection.InvokeAsync( "DispatchBrowserEvent", - JsonSerializer.Serialize(browserDescriptor, new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase }), + JsonSerializer.Serialize(browserDescriptor, TestJsonSerializerOptionsProvider.Options), "{Invalid:{\"payload}"); Assert.Contains( @@ -439,8 +439,8 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests await Client.HubConnection.InvokeAsync( "DispatchBrowserEvent", - JsonSerializer.Serialize(browserDescriptor, new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase }), - JsonSerializer.Serialize(mouseEventArgs, new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase })); + JsonSerializer.Serialize(browserDescriptor, TestJsonSerializerOptionsProvider.Options), + JsonSerializer.Serialize(mouseEventArgs, TestJsonSerializerOptionsProvider.Options)); Assert.Contains( logEvents, @@ -473,7 +473,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests EventArgsType = "mouse", }; - var serializerOptions = new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase }; + var serializerOptions = TestJsonSerializerOptionsProvider.Options; var uiArgs = JsonSerializer.Serialize(mouseEventArgs, serializerOptions); await Assert.ThrowsAsync(() => Client.InvokeDotNetMethod(