diff --git a/src/Http/Http.Results/test/ResultsTests.cs b/src/Http/Http.Results/test/ResultsTests.cs index c2cbe90b2d00..7bdbe44eb986 100644 --- a/src/Http/Http.Results/test/ResultsTests.cs +++ b/src/Http/Http.Results/test/ResultsTests.cs @@ -1009,15 +1009,15 @@ public void Json_WithNullSerializerContext_ThrowsArgException() [Fact] public void Json_WithInvalidSerializerContext_ThrowsInvalidOperationException() { - var ex = Assert.Throws(() => Results.Json(null, type: typeof(object), context: StringJsonContext.Default)); - Assert.Equal(ex.Message, $"Unable to obtain the JsonTypeInfo for type 'System.Object' from the context '{typeof(StringJsonContext).FullName}'."); + var ex = Assert.Throws(() => Results.Json(null, type: typeof(Todo), context: StringJsonContext.Default)); + Assert.Equal(ex.Message, $"Unable to obtain the JsonTypeInfo for type 'Microsoft.AspNetCore.Http.HttpResults.ResultsTests+Todo' from the context '{typeof(StringJsonContext).FullName}'."); } [Fact] public void JsonOfT_WithInvalidSerializerContext_ThrowsInvalidOperationException() { - var ex = Assert.Throws(() => Results.Json(null, context: StringJsonContext.Default)); - Assert.Equal(ex.Message, $"Unable to obtain the JsonTypeInfo for type 'System.Object' from the context '{typeof(StringJsonContext).FullName}'."); + var ex = Assert.Throws(() => Results.Json(null, context: StringJsonContext.Default)); + Assert.Equal(ex.Message, $"Unable to obtain the JsonTypeInfo for type 'Microsoft.AspNetCore.Http.HttpResults.ResultsTests+Todo' from the context '{typeof(StringJsonContext).FullName}'."); } [Fact]