|
|
@@ -5,6 +5,7 @@ using System.Globalization;
|
|
|
using System.Text;
|
|
|
using System.Text.Json;
|
|
|
using System.Text.Json.Serialization;
|
|
|
+using Microsoft.AspNetCore.Testing;
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
|
|
namespace Microsoft.AspNetCore.Mvc.Formatters;
|
|
|
@@ -132,6 +133,7 @@ public class SystemTextJsonInputFormatterTest : JsonInputFormatterTestBase
|
|
|
[InlineData("{\"a\":{\"b\"}}", "$.a", "'}' is invalid after a property name. Expected a ':'. Path: $.a | LineNumber: 0 | BytePositionInLine: 9.")]
|
|
|
[InlineData("{\"age\":\"x\"}", "$.age", "The JSON value could not be converted to System.Decimal. Path: $.age | LineNumber: 0 | BytePositionInLine: 10.")]
|
|
|
[InlineData("{\"login\":1}", "$.login", "The JSON value could not be converted to Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonInputFormatterTest+UserLogin. Path: $.login | LineNumber: 0 | BytePositionInLine: 10.")]
|
|
|
+ [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/40661")]
|
|
|
public async Task ReadAsync_WithAllowInputFormatterExceptionMessages_RegistersJsonInputExceptionsAsInputFormatterException(
|
|
|
string content,
|
|
|
string modelStateKey,
|