18 writes to SimpleObject
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (18)
IntegrationTests\ListIntegrationTest.cs (8)
19SimpleObject = new SimpleObject() 38SimpleObject = new SimpleObject() 59SimpleObject = new SimpleObject() 110SimpleObject = new SimpleObject() 175SimpleObject = new SimpleObject() 216SimpleObject = new SimpleObject() 238SimpleObject = new SimpleObject() 349SimpleObject = new SimpleObject()
IntegrationTests\NestedObjectIntegrationTest.cs (9)
105SimpleObject = new SimpleObject() 127SimpleObject = new SimpleObject() 149SimpleObject = new SimpleObject() 172SimpleObject = new SimpleObject() 195SimpleObject = new SimpleObject() 227SimpleObject = new SimpleObject(), 247SimpleObject = new SimpleObject(), 267SimpleObject = new SimpleObject() 301SimpleObject = sDto,
TestObjectModels\SimpleObjectWithNestedObject.cs (1)
25SimpleObject = new SimpleObject();
39 references to SimpleObject
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (39)
IntegrationTests\ListIntegrationTest.cs (13)
26patchDocument.Test(o => o.SimpleObject.IntegerList, 3, 2); 45patchDocument.Test(o => o.SimpleObject.IntegerList, 4, -1); 66patchDocument.Add(o => (List<int>)o.SimpleObject.IntegerIList, 4, 0); 72Assert.Equal(new List<int>() { 4, 1, 2, 3 }, targetObject.SimpleObject.IntegerIList); 117patchDocument.Add(o => o.SimpleObject.IntegerList, 4); 123Assert.Equal(new List<int>() { 1, 2, 3, 4 }, targetObject.SimpleObject.IntegerList); 182patchDocument.Remove<int>(o => o.SimpleObject.IntegerList); 188Assert.Equal(new List<int>() { 1, 2 }, targetObject.SimpleObject.IntegerList); 223patchDocument.Replace(o => o.SimpleObject.IntegerList, 5); 229Assert.Equal(new List<int>() { 1, 2, 5 }, targetObject.SimpleObject.IntegerList); 245patchDocument.Replace(o => o.SimpleObject.IntegerList, 5, -1); 356patchDocument.Move(o => o.SimpleObject.IntegerList, 0, o => o.IntegerValue); 362Assert.Equal(new List<int>() { 2, 3 }, targetObject.SimpleObject.IntegerList);
IntegrationTests\NestedObjectIntegrationTest.cs (26)
112patchDocument.Add(o => o.SimpleObject.StringProperty, "B"); 118Assert.Equal("B", targetObject.SimpleObject.StringProperty); 134patchDocument.Remove(o => o.SimpleObject.StringProperty); 140Assert.Null(targetObject.SimpleObject.StringProperty); 157patchDocument.Copy(o => o.SimpleObject.StringProperty, o => o.SimpleObject.AnotherStringProperty); 163Assert.Equal("A", targetObject.SimpleObject.AnotherStringProperty); 180patchDocument.Copy(o => o.SimpleObject.StringProperty, o => o.SimpleObject.AnotherStringProperty); 186Assert.Null(targetObject.SimpleObject.AnotherStringProperty); 208patchDocument.Copy(o => o.InheritedObject, o => o.SimpleObject); 214Assert.Equal("C", targetObject.SimpleObject.StringProperty); 215Assert.Equal("D", targetObject.SimpleObject.AnotherStringProperty); 218Assert.NotSame(targetObject.SimpleObject.StringProperty, targetObject.InheritedObject.StringProperty); 232patchDocument.Copy(o => o.InheritedObject, o => o.SimpleObject); 238Assert.Equal(typeof(InheritedObject), targetObject.SimpleObject.GetType()); 252patchDocument.Copy(o => o.InheritedObject, o => o.SimpleObject); 258Assert.NotSame(targetObject.SimpleObject, targetObject.InheritedObject); 275patchDocument.Move(o => o.SimpleObject.IntegerValue, o => o.SimpleObject.AnotherIntegerValue); 281Assert.Equal(2, targetObject.SimpleObject.AnotherIntegerValue); 282Assert.Equal(0, targetObject.SimpleObject.IntegerValue); 306patchDocument.Move(o => o.InheritedObject, o => o.SimpleObject); 312Assert.Equal("C", targetObject.SimpleObject.StringProperty); 313Assert.Equal("D", targetObject.SimpleObject.AnotherStringProperty); 314Assert.Same(iDto, targetObject.SimpleObject);