public Execute ( |
||
rockContext | The rock context. | |
action | WorkflowAction | The action. |
entity | Object | The entity. |
errorMessages | List |
The error messages. |
return | bool |
public void ReturnsFalse() { var BackgroundAction = new BackgroundCheckRequest(); var action = new WorkflowAction { ActionType = new WorkflowActionType() { // add in the expected objects so we don't make a db request // in the future the db connection should be mocked Attributes = new Dictionary<string, AttributeCache>(), AttributeValues = new Dictionary<string, AttributeValueCache>() } }; var errors = new List<string>(); var result = BackgroundAction.Execute( new RockContext(), action, null, out errors ); Assert.False( result ); }
public void InvalidProviderGuidError() { var BackgroundAction = new BackgroundCheckRequest(); var action = new WorkflowAction { ActionType = new WorkflowActionType() { // add in the expected objects so we don't make a db request Attributes = new Dictionary<string, AttributeCache>(), AttributeValues = new Dictionary<string, AttributeValueCache>() } }; var errors = new List<string>(); var result = BackgroundAction.Execute( new RockContext(), action, null, out errors ); Assert.Equal( errors.Count, 1 ); Assert.Equal( errors[0], "Invalid Background Check Provider Guid!" ); }