Class TestEntityContext

Namespace
XBullet.EasyTesting.AzureFunctions
Assembly
XBullet.EasyTesting.AzureFunctions.dll

Supplies entity identity and records outgoing signals and orchestration starts.

public sealed class TestEntityContext : TaskEntityContext
Inheritance
TestEntityContext
Inherited Members
Extension Methods

Remarks

Outgoing operations do not execute automatically. Inputs and options are retained by reference.

Constructors

TestEntityContext(EntityInstanceId)

Creates a context for one entity.

public TestEntityContext(EntityInstanceId id)

Parameters

id EntityInstanceId

The entity identity, including a non-empty name and non-null key.

Properties

Id

Gets the instance ID of this entity.

public override EntityInstanceId Id { get; }

Property Value

EntityInstanceId

ScheduleHandler

Gets or sets orchestration scheduling behavior.

public Func<RecordedOrchestrationStart, string>? ScheduleHandler { get; set; }

Property Value

Func<RecordedOrchestrationStart, string>

An optional synchronous callback; null returns the explicit or generated test ID.

ScheduledOrchestrations

Gets orchestration scheduling attempts.

public IReadOnlyList<RecordedOrchestrationStart> ScheduledOrchestrations { get; }

Property Value

IReadOnlyList<RecordedOrchestrationStart>

An ordered snapshot; scheduling does not run orchestrations.

SignalHandler

Gets or sets outgoing signal submission behavior.

public Action<RecordedEntityOperation>? SignalHandler { get; set; }

Property Value

Action<RecordedEntityOperation>

An optional synchronous callback invoked after recording.

Signals

Gets outgoing signal attempts.

public IReadOnlyList<RecordedEntityOperation> Signals { get; }

Property Value

IReadOnlyList<RecordedEntityOperation>

An ordered snapshot, including attempts whose handlers fail.

Methods

ScheduleNewOrchestration(TaskName, object?, StartOrchestrationOptions?)

Starts an orchestration.

public override string ScheduleNewOrchestration(TaskName name, object? input = null, StartOrchestrationOptions? options = null)

Parameters

name TaskName

The name of the orchestration to start.

input object

The input for the orchestration.

options StartOrchestrationOptions

The options for starting the orchestration.

Returns

string

The instance id for the new orchestration.

SignalEntity(EntityInstanceId, string, object?, SignalEntityOptions?)

Signals an entity operation.

public override void SignalEntity(EntityInstanceId id, string operationName, object? input = null, SignalEntityOptions? options = null)

Parameters

id EntityInstanceId

The entity to signal.

operationName string

The operation name.

input object

The operation input.

options SignalEntityOptions

The options to signal with.