Table of Contents

Class RulesTestFixture

Namespace
NRules.Testing
Assembly
NRules.Testing.dll

Fixture to test rules.

public class RulesTestFixture
Inheritance
RulesTestFixture
Inherited Members

Constructors

RulesTestFixture()

Initializes a new instance of the RulesTestFixture class.

public RulesTestFixture()

Properties

Asserter

Gets or sets the framework-specific asserter to validate rule firing expectations.

public IRuleAsserter Asserter { get; set; }

Property Value

IRuleAsserter

Remarks

If asserter is not set, it's initialized to a NRules.Testing.DefaultRuleAsserter on first access.

Recorder

Gets the rule invocation recorder to inspect rule firing.

public IRuleInvocationRecorder Recorder { get; }

Property Value

IRuleInvocationRecorder

Session

Gets the current rules engine session.

public ISession Session { get; }

Property Value

ISession

Setup

Gets the test setup to register rules under test.

public IRulesTestSetup Setup { get; }

Property Value

IRulesTestSetup

Methods

Verify(Action<IRulesFiringVerification>)

Configures assertions for rules firing using an expectation builder.

public void Verify(Action<IRulesFiringVerification> buildAction)

Parameters

buildAction Action<IRulesFiringVerification>

VerifySequence(Action<IRuleSequenceFiringVerification>)

Configures assertions of the exact rules firing sequence using an expectation builder.

public void VerifySequence(Action<IRuleSequenceFiringVerification> buildAction)

Parameters

buildAction Action<IRuleSequenceFiringVerification>