Table of Contents

Class RuleAssertResult

Namespace
NRules.Testing
Assembly
NRules.Testing.dll

Represents the result for a rule firing assertion.

public sealed class RuleAssertResult
Inheritance
RuleAssertResult
Inherited Members

Constructors

RuleAssertResult(string?, RuleAssertStatus, string, object, object)

Initializes a new instance of the RuleAssertResult class.

public RuleAssertResult(string? ruleName, RuleAssertStatus status, string assertionText, object expected, object actual)

Parameters

ruleName string

Name of the rule corresponding to the assertion.

status RuleAssertStatus

Assertion outcome.

assertionText string

Text that describes the assertion.

expected object

Expected outcome.

actual object

Actual outcome.

Properties

Actual

Gets the actual assertion outcome.

public object Actual { get; }

Property Value

object

AssertionText

Gets the text that describes the assertion.

public string AssertionText { get; }

Property Value

string

Expected

Gets the expected assertion outcome.

public object Expected { get; }

Property Value

object

RuleName

Gets the name of the rule corresponding to the assertion.

public string? RuleName { get; }

Property Value

string

Status

Gets the rule assertion outcome.

public RuleAssertStatus Status { get; }

Property Value

RuleAssertStatus

Methods

GetMessage()

Gets the message that describes the assertion outcome.

public string GetMessage()

Returns

string