public void ConstructPatchOperationTest() { PatchOperation operation = PatchOperation.CreateAddOperation(path, "string"); PatchOperationTests.ValidateOperations(operation, PatchOperationType.Add, "string"); DateTime current = DateTime.UtcNow; operation = PatchOperation.CreateAddOperation(path, current); PatchOperationTests.ValidateOperations(operation, PatchOperationType.Add, current); dynamic complexObject = new { a = "complex", b = 12.34, c = true }; operation = PatchOperation.CreateAddOperation(path, complexObject); PatchOperationTests.ValidateOperations(operation, PatchOperationType.Add, complexObject); operation = PatchOperation.CreateRemoveOperation(path); PatchOperationTests.ValidateOperations(operation, PatchOperationType.Remove, "value not required"); int[] arrayObject = { 1, 2, 3 }; operation = PatchOperation.CreateReplaceOperation(path, arrayObject); PatchOperationTests.ValidateOperations(operation, PatchOperationType.Replace, arrayObject); Guid guid = new Guid(); operation = PatchOperation.CreateSetOperation(path, guid); PatchOperationTests.ValidateOperations(operation, PatchOperationType.Set, guid); }