Class TestOrchestrationMetadataBuilder

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

Builds SDK metadata fixtures with readable typed payloads and deterministic timestamps.

public sealed class TestOrchestrationMetadataBuilder
Inheritance
TestOrchestrationMetadataBuilder
Inherited Members
Extension Methods

Constructors

TestOrchestrationMetadataBuilder(string, string)

Creates a pending-instance fixture.

public TestOrchestrationMetadataBuilder(string orchestrationName, string instanceId)

Parameters

orchestrationName string

The non-empty orchestration name.

instanceId string

The non-empty instance ID.

Methods

Build()

Creates a fresh SDK metadata snapshot, serializing configured payloads.

public OrchestrationMetadata Build()

Returns

OrchestrationMetadata

Metadata with typed payload readers enabled, including when payloads are absent.

WithCustomStatus<T>(T)

Sets custom status serialized when Build is called.

public TestOrchestrationMetadataBuilder WithCustomStatus<T>(T status)

Parameters

status T

The original status reference; null clears custom status.

Returns

TestOrchestrationMetadataBuilder

This builder for chaining.

Type Parameters

T

The status value type.

WithDataConverter(DataConverter)

Sets the payload converter, also used by the built metadata's typed readers.

public TestOrchestrationMetadataBuilder WithDataConverter(DataConverter converter)

Parameters

converter DataConverter

The non-null caller-owned converter. Defaults to the SDK JSON converter.

Returns

TestOrchestrationMetadataBuilder

This builder for chaining. The converter is used for all payloads at Build time.

WithFailure(TaskFailureDetails)

Sets failure details and the Failed runtime status.

public TestOrchestrationMetadataBuilder WithFailure(TaskFailureDetails failure)

Parameters

failure TaskFailureDetails

The non-null SDK failure descriptor retained by reference.

Returns

TestOrchestrationMetadataBuilder

This builder for chaining.

WithFailure(Exception)

Creates SDK failure details from an exception and sets Failed status.

public TestOrchestrationMetadataBuilder WithFailure(Exception exception)

Parameters

exception Exception

The non-null exception whose details may include sensitive text and stack traces.

Returns

TestOrchestrationMetadataBuilder

This builder for chaining.

WithInput<T>(T)

Sets input serialized when Build is called.

public TestOrchestrationMetadataBuilder WithInput<T>(T input)

Parameters

input T

The original input reference; null clears input.

Returns

TestOrchestrationMetadataBuilder

This builder for chaining.

Type Parameters

T

The input type.

WithOutput<T>(T)

Sets output serialized when Build is called.

public TestOrchestrationMetadataBuilder WithOutput<T>(T output)

Parameters

output T

The original output reference; null clears output.

Returns

TestOrchestrationMetadataBuilder

This builder for chaining.

Type Parameters

T

The output type.

WithRuntimeStatus(OrchestrationRuntimeStatus)

Sets a defined SDK runtime status.

public TestOrchestrationMetadataBuilder WithRuntimeStatus(OrchestrationRuntimeStatus status)

Parameters

status OrchestrationRuntimeStatus

The status to report. Choosing a non-failed status clears failure details.

Returns

TestOrchestrationMetadataBuilder

This builder for chaining.

WithTags(IReadOnlyDictionary<string, string>)

Copies tags using case-sensitive ordinal keys.

public TestOrchestrationMetadataBuilder WithTags(IReadOnlyDictionary<string, string> tags)

Parameters

tags IReadOnlyDictionary<string, string>

The non-null tags to copy. Defaults to empty.

Returns

TestOrchestrationMetadataBuilder

This builder for chaining.

WithTimestamps(DateTimeOffset, DateTimeOffset)

Sets creation and update times, normalized to UTC.

public TestOrchestrationMetadataBuilder WithTimestamps(DateTimeOffset createdAt, DateTimeOffset lastUpdatedAt)

Parameters

createdAt DateTimeOffset

The creation time. Defaults to Unix epoch.

lastUpdatedAt DateTimeOffset

The update time, which must not precede creation. Defaults to Unix epoch.

Returns

TestOrchestrationMetadataBuilder

This builder for chaining.