Table of Contents

Class GovernanceConstraintContract<TContext>

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

Reusable contract fixture for IGovernanceConstraint<TContext> implementations.

public abstract class GovernanceConstraintContract<TContext>

Type Parameters

TContext

The framework-neutral evaluation context type.

Inheritance
GovernanceConstraintContract<TContext>
Inherited Members

Methods

CreateConstraint()

Creates the constraint implementation under test.

protected abstract IGovernanceConstraint<TContext> CreateConstraint()

Returns

IGovernanceConstraint<TContext>

The constraint implementation to validate.

CreateEvaluationContext()

Creates the context supplied to the constraint implementation under test.

protected abstract TContext CreateEvaluationContext()

Returns

TContext

The evaluation context to validate with.

VerifyConstraintReturnsSafeResultAsync(CancellationToken)

Verifies that the constraint returns a safe, non-null result shape.

public ValueTask<ConstraintEvaluationResult> VerifyConstraintReturnsSafeResultAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A token that can cancel the contract validation.

Returns

ValueTask<ConstraintEvaluationResult>

The verified constraint result.