10 instantiations of ObjectWithJObject
Microsoft.AspNetCore.JsonPatch.Tests (10)
32 references to ObjectWithJObject
Microsoft.AspNetCore.JsonPatch.Tests (32)
JsonPatchDocumentJObjectTest.cs (32)
20var model = new ObjectWithJObject { CustomData = JObject.FromObject(new { Emails = new[] { "foo@bar.com" } }) };
21var patch = new JsonPatchDocument<ObjectWithJObject>();
23patch.Operations.Add(new Operation<ObjectWithJObject>("add", "/CustomData/Emails/-", null, "foo@baz.com"));
36var model = new ObjectWithJObject { CustomData = JObject.FromObject(new { Email = "foo@bar.com", Name = "Bar" }) };
37var patch = new JsonPatchDocument<ObjectWithJObject>();
39patch.Operations.Add(new Operation<ObjectWithJObject>("test", "/CustomData/Email", null, "foo@baz.com"));
40patch.Operations.Add(new Operation<ObjectWithJObject>("add", "/CustomData/Name", null, "Bar Baz"));
50var model = new ObjectWithJObject { CustomData = JObject.FromObject(new { Email = "foo@bar.com", Name = "Bar" }) };
51var patch = new JsonPatchDocument<ObjectWithJObject>();
53patch.Operations.Add(new Operation<ObjectWithJObject>("test", "/CustomData/Email", null, "foo@bar.com"));
54patch.Operations.Add(new Operation<ObjectWithJObject>("add", "/CustomData/Name", null, "Bar Baz"));
67var model = new ObjectWithJObject { CustomData = JObject.FromObject(new { Email = "foo@bar.com" }) };
68var patch = new JsonPatchDocument<ObjectWithJObject>();
70patch.Operations.Add(new Operation<ObjectWithJObject>("copy", "/CustomData/UserName", "/CustomData/Email"));
83var model = new ObjectWithJObject { CustomData = JObject.FromObject(new { FirstName = "Foo", LastName = "Bar" }) };
84var patch = new JsonPatchDocument<ObjectWithJObject>();
86patch.Operations.Add(new Operation<ObjectWithJObject>("remove", "/CustomData/LastName", null));
99var model = new ObjectWithJObject { CustomData = JObject.FromObject(new { FirstName = "Bar" }) };
100var patch = new JsonPatchDocument<ObjectWithJObject>();
102patch.Operations.Add(new Operation<ObjectWithJObject>("move", "/CustomData/LastName", "/CustomData/FirstName"));
116var model = new ObjectWithJObject();
117var patch = new JsonPatchDocument<ObjectWithJObject>();
119patch.Operations.Add(new Operation<ObjectWithJObject>("add", "/CustomData/Name", null, "Foo"));
132var model = new ObjectWithJObject();
133var patch = new JsonPatchDocument<ObjectWithJObject>();
135patch.Operations.Add(new Operation<ObjectWithJObject>("add", "/CustomData/Name", null, null));
148var model = new ObjectWithJObject { CustomData = JObject.FromObject(new { Email = "foo@bar.com", Name = "Bar" }) };
149var patch = new JsonPatchDocument<ObjectWithJObject>();
151patch.Operations.Add(new Operation<ObjectWithJObject>("replace", "/CustomData/Email", null, "foo@baz.com"));
164var model = new ObjectWithJObject { CustomData = JObject.FromObject(new { Email = "foo@bar.com", Name = "Bar" }) };
165var patch = new JsonPatchDocument<ObjectWithJObject>();
167patch.Operations.Add(new Operation<ObjectWithJObject>("replace", "/CustomData/Email", null, null));