Example #1
0
        public string PatchResource(string actionJson, ActionPatch actionPatch)
        {
            if (string.IsNullOrEmpty(actionJson))
            {
                return(null);
            }

            if (actionPatch == null)
            {
                return(null);
            }

            actionPatch.SetDefaultValues();

            var updatedAction = _actionPatchService.Patch(actionJson, actionPatch);

            return(updatedAction);
        }
        public void ActionPatchServiceTests_ReturnsNull_WhenActionPatchIsNull()
        {
            var result = _actionPatchService.Patch(string.Empty, Arg.Any <ActionPatch>());

            // Assert
            Assert.IsNull(result);
        }