Interface IRulesTestSetup
Sets up rules test.
public interface IRulesTestSetup
Properties
CompilerSetupAction
Gets or sets the action to apply when creating the RuleCompiler.
Action<RuleCompiler> CompilerSetupAction { get; set; }
Property Value
Rules
Rules under test.
IReadOnlyCollection<RuleInfo> Rules { get; }
Property Value
Methods
Rule(Rule)
Adds specific rule under test to the setup.
void Rule(Rule ruleInstance)
Parameters
ruleInstance
RuleRule instance to add.
Rule(IRuleDefinition)
Adds specific rule under test to the setup.
void Rule(IRuleDefinition ruleDefinition)
Parameters
ruleDefinition
IRuleDefinitionRule definition to add.
Remarks
Rules registered as IRuleDefinition cannot participate in assertions that use Fluent DSL information, such as the rule CLR type.
Rule(Type)
Adds specific rule under test to the setup.
void Rule(Type ruleType)
Parameters
Remarks
If ruleType
is not derived from Rule or is not concrete,
it will be ignored.
Rule<T>()
Adds specific rule under test to the setup.
void Rule<T>() where T : Rule
Type Parameters
T
Type of the rule to add.
Remarks
If T
is not concrete, it will be ignored.