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