Table of Contents

Class Matched

Namespace
NRules.Testing
Assembly
NRules.Testing.dll

Fluent builder for specifying fact constraints in a rule firing expectation.

public static class Matched
Inheritance
Matched
Inherited Members

Methods

Fact<TFact>()

Creates a constraint that the matched fact is of the specified type.

public static FactConstraint<TFact> Fact<TFact>() where TFact : notnull

Returns

FactConstraint<TFact>

Type Parameters

TFact

Type of the matched fact.

Fact<TFact>(Expression<Func<TFact, bool>>)

Creates a constraint that the matched fact satisfies the specified predicate.

public static FactConstraint<TFact> Fact<TFact>(Expression<Func<TFact, bool>> predicateExpression) where TFact : notnull

Parameters

predicateExpression Expression<Func<TFact, bool>>

Predicate that the matched fact must satisfy.

Returns

FactConstraint<TFact>

Type Parameters

TFact

Type of the matched fact.

Fact<TFact>(TFact)

Creates a constraint that the matched fact is equal to the specified value.

public static FactConstraint<TFact> Fact<TFact>(TFact factValue) where TFact : notnull

Parameters

factValue TFact

Value that the matched fact must be equal to.

Returns

FactConstraint<TFact>

Type Parameters

TFact

Type of the matched fact.