Table of Contents

Class GovernancePolicyEvaluatorContract<TContext>

Namespace
AsiBackbone.Testing.Contracts
Assembly
AsiBackbone.Testing.dll

Reusable contract fixture for IGovernancePolicyEvaluator<TContext> implementations.

public abstract class GovernancePolicyEvaluatorContract<TContext> where TContext : IGovernanceEvaluationContext

Type Parameters

TContext

The framework-neutral evaluation context type.

Inheritance
GovernancePolicyEvaluatorContract<TContext>
Inherited Members

Methods

CreateEvaluationContext()

Creates the context supplied to the evaluator implementation under test.

protected abstract TContext CreateEvaluationContext()

Returns

TContext

The evaluation context to validate with.

CreateEvaluator()

Creates the evaluator implementation under test.

protected abstract IGovernancePolicyEvaluator<TContext> CreateEvaluator()

Returns

IGovernancePolicyEvaluator<TContext>

The evaluator implementation to validate.

VerifyEvaluatorReturnsSafeDecisionAsync(CancellationToken)

Verifies that the evaluator returns a safe, non-null decision and preserves supplied decision telemetry.

public ValueTask<GovernanceDecision> VerifyEvaluatorReturnsSafeDecisionAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A token that can cancel the contract validation.

Returns

ValueTask<GovernanceDecision>

The verified governance decision.