18 writes to SimpleObject
Microsoft.AspNetCore.JsonPatch.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)
104SimpleObject = new SimpleObject() 142SimpleObject = new SimpleObject() 164SimpleObject = new SimpleObject() 187SimpleObject = new SimpleObject() 210SimpleObject = new SimpleObject() 242SimpleObject = new SimpleObject(), 262SimpleObject = new SimpleObject(), 282SimpleObject = new SimpleObject() 316SimpleObject = sDto,
TestObjectModels\SimpleObjectWithNestedObject.cs (1)
25SimpleObject = new SimpleObject();
39 references to SimpleObject
Microsoft.AspNetCore.JsonPatch.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)
111patchDocument.Add(o => o.SimpleObject.StringProperty, "B"); 117Assert.Equal("B", targetObject.SimpleObject.StringProperty); 149patchDocument.Remove(o => o.SimpleObject.StringProperty); 155Assert.Null(targetObject.SimpleObject.StringProperty); 172patchDocument.Copy(o => o.SimpleObject.StringProperty, o => o.SimpleObject.AnotherStringProperty); 178Assert.Equal("A", targetObject.SimpleObject.AnotherStringProperty); 195patchDocument.Copy(o => o.SimpleObject.StringProperty, o => o.SimpleObject.AnotherStringProperty); 201Assert.Null(targetObject.SimpleObject.AnotherStringProperty); 223patchDocument.Copy(o => o.InheritedObject, o => o.SimpleObject); 229Assert.Equal("C", targetObject.SimpleObject.StringProperty); 230Assert.Equal("D", targetObject.SimpleObject.AnotherStringProperty); 233Assert.NotSame(targetObject.SimpleObject.StringProperty, targetObject.InheritedObject.StringProperty); 247patchDocument.Copy(o => o.InheritedObject, o => o.SimpleObject); 253Assert.Equal(typeof(InheritedObject), targetObject.SimpleObject.GetType()); 267patchDocument.Copy(o => o.InheritedObject, o => o.SimpleObject); 273Assert.NotSame(targetObject.SimpleObject, targetObject.InheritedObject); 290patchDocument.Move(o => o.SimpleObject.IntegerValue, o => o.SimpleObject.AnotherIntegerValue); 296Assert.Equal(2, targetObject.SimpleObject.AnotherIntegerValue); 297Assert.Equal(0, targetObject.SimpleObject.IntegerValue); 321patchDocument.Move(o => o.InheritedObject, o => o.SimpleObject); 327Assert.Equal("C", targetObject.SimpleObject.StringProperty); 328Assert.Equal("D", targetObject.SimpleObject.AnotherStringProperty); 329Assert.Same(iDto, targetObject.SimpleObject);