Class TestDurableTaskClientAssertions

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

Fluent assertions over client call attempts, without claiming handler success.

public sealed class TestDurableTaskClientAssertions
Inheritance
TestDurableTaskClientAssertions
Inherited Members
Extension Methods

Methods

BeEmpty()

Requires that no operations were recorded.

public TestDurableTaskClientAssertions BeEmpty()

Returns

TestDurableTaskClientAssertions

This assertion object for chaining.

HaveCount(int)

Requires an exact total number of recorded client attempts.

public TestDurableTaskClientAssertions HaveCount(int expected)

Parameters

expected int

The non-negative operation count.

Returns

TestDurableTaskClientAssertions

This assertion object for chaining.

HaveMatchingOperations(Func<RecordedDurableClientOperation, bool>, int)

Requires an exact count of operations matching a custom argument predicate.

public TestDurableTaskClientAssertions HaveMatchingOperations(Func<RecordedDurableClientOperation, bool> predicate, int times = 1)

Parameters

predicate Func<RecordedDurableClientOperation, bool>

The non-null predicate, run once per recorded operation. Predicate exceptions propagate.

times int

The non-negative expected count, defaulting to one.

Returns

TestDurableTaskClientAssertions

This assertion object for chaining.

HaveOperation(DurableClientOperation, string?, int)

Requires an exact count of an operation, optionally scoped to one instance.

public TestDurableTaskClientAssertions HaveOperation(DurableClientOperation operation, string? instanceId = null, int times = 1)

Parameters

operation DurableClientOperation

A defined operation kind.

instanceId string

A case-sensitive instance ID, or null to match any target.

times int

The non-negative expected count, defaulting to one.

Returns

TestDurableTaskClientAssertions

This assertion object for chaining.

HaveOperationSequence(params DurableClientOperation[])

Requires the complete recorded operation sequence to match exactly.

public TestDurableTaskClientAssertions HaveOperationSequence(params DurableClientOperation[] operations)

Parameters

operations DurableClientOperation[]

The non-null ordered operation kinds; an empty array requires no operations.

Returns

TestDurableTaskClientAssertions

This assertion object for chaining.

HaveRaisedEvent(string, string, int)

Requires an exact count of event attempts.

public TestDurableTaskClientAssertions HaveRaisedEvent(string instanceId, string eventName, int times = 1)

Parameters

instanceId string

The non-empty, case-sensitive target instance ID.

eventName string

The non-empty event name, matched case-insensitively as in the SDK.

times int

The non-negative expected count, defaulting to one.

Returns

TestDurableTaskClientAssertions

This assertion object for chaining.

HaveScheduledOrchestration(string, string?, int)

Requires an exact count of scheduling attempts for a name and optional ID.

public TestDurableTaskClientAssertions HaveScheduledOrchestration(string orchestratorName, string? instanceId = null, int times = 1)

Parameters

orchestratorName string

The non-empty, case-sensitive orchestration name.

instanceId string

A case-sensitive instance ID, or null to match any ID.

times int

The non-negative expected count, defaulting to one.

Returns

TestDurableTaskClientAssertions

This assertion object for chaining.