From 80da4611d9f43294a638e119fcbc332b663c0f58 Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Fri, 7 Oct 2016 05:40:52 -0700 Subject: [PATCH] Updated JsonPatchExtensionsTest exception message (Reacting to JsonPatch repo commit: 393c25988ae2a57b6be4235ee4848212c3dcd861) --- .../JsonPatchExtensionsTest.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/Microsoft.AspNetCore.Mvc.Test/JsonPatchExtensionsTest.cs b/test/Microsoft.AspNetCore.Mvc.Test/JsonPatchExtensionsTest.cs index 6f206ec2a9..a41c400086 100644 --- a/test/Microsoft.AspNetCore.Mvc.Test/JsonPatchExtensionsTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Test/JsonPatchExtensionsTest.cs @@ -14,7 +14,7 @@ namespace Microsoft.AspNetCore.Mvc public void ApplyTo_JsonPatchDocument_ModelState() { // Arrange - var operation = new Operation("add", "Customer/CustomerId", from: null, value: "TestName"); + var operation = new Operation("add", "CustomerId", from: null, value: "TestName"); var patchDoc = new JsonPatchDocument(); patchDoc.Operations.Add(operation); @@ -25,14 +25,14 @@ namespace Microsoft.AspNetCore.Mvc // Assert var error = Assert.Single(modelState["Customer"].Errors); - Assert.Equal("The property at path 'Customer/CustomerId' could not be added.", error.ErrorMessage); + Assert.Equal("The target location specified by path segment 'CustomerId' was not found.", error.ErrorMessage); } [Fact] public void ApplyTo_JsonPatchDocument_PrefixModelState() { // Arrange - var operation = new Operation("add", "Customer/CustomerId", from: null, value: "TestName"); + var operation = new Operation("add", "CustomerId", from: null, value: "TestName"); var patchDoc = new JsonPatchDocument(); patchDoc.Operations.Add(operation); @@ -43,7 +43,7 @@ namespace Microsoft.AspNetCore.Mvc // Assert var error = Assert.Single(modelState["jsonpatch.Customer"].Errors); - Assert.Equal("The property at path 'Customer/CustomerId' could not be added.", error.ErrorMessage); + Assert.Equal("The target location specified by path segment 'CustomerId' was not found.", error.ErrorMessage); } public class Customer