Ejemplo n.º 1
0
        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!");
        }
Ejemplo n.º 2
0
        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);
        }