예제 #1
0
        public void FactoryShouldThrowExceptionForUnCreateableRules()
        {
            RuleFactory factory = new RuleFactory(GetType().Assembly.GetTypes(), null, null);
            ICalidusRuleConfigurationFactory configFactory = Mocker.DynamicMock <ICalidusRuleConfigurationFactory>();

            Assert.Throws <CalidusException>(delegate
            {
                factory.GetStatementRules(configFactory);
            },
                                             "Found rule UnCreatableRule, but an instance could not be created because the rule configuration does not match the constructor and no default no-args constructor was found"
                                             );
        }
예제 #2
0
 /// <summary>
 /// Gets the list of statement rules in the specified project
 /// </summary>
 /// <param name="configFactory">The configuration factory to use</param>
 /// <returns>The rules</returns>
 public IEnumerable <StatementRuleBase> GetStatementRules(ICalidusRuleConfigurationFactory configFactory)
 {
     return(_factory.GetStatementRules(configFactory));
 }