Class TaskOrchestrationContextTestExtensions
Provides Durable Task orchestration helpers that route replay-safe logger creation back through FastMoq's existing logger capture APIs.
Inherited Members
Namespace: FastMoq.AzureFunctions.Extensions
Assembly: FastMoq.AzureFunctions.dll
Syntax
public static class TaskOrchestrationContextTestExtensions
Methods
AddTaskOrchestrationReplaySafeLogging(Mocker, ILoggerFactory, bool, bool)
Configures tracked TaskOrchestrationContext mocks to use replay-safe logger creation with the supplied logger factory.
Declaration
public static Mocker AddTaskOrchestrationReplaySafeLogging(this Mocker mocker, ILoggerFactory loggerFactory, bool isReplaying = false, bool replace = false)
Parameters
| Type | Name | Description |
|---|---|---|
| Mocker | mocker | The current Mocker instance. |
| ILoggerFactory | loggerFactory | The logger factory that replay-safe logger creation should delegate to. |
| bool | isReplaying | True to suppress replay-safe logger output, false to allow normal log capture. |
| bool | replace | True to replace an existing orchestration helper registration. |
Returns
| Type | Description |
|---|---|
| Mocker | The current Mocker instance. |
AddTaskOrchestrationReplaySafeLogging(Mocker, bool, bool)
Registers a capture-backed logger factory and configures tracked TaskOrchestrationContext mocks to use replay-safe logger creation.
Declaration
public static Mocker AddTaskOrchestrationReplaySafeLogging(this Mocker mocker, bool isReplaying = false, bool replace = false)
Parameters
| Type | Name | Description |
|---|---|---|
| Mocker | mocker | The current Mocker instance. |
| bool | isReplaying | True to suppress replay-safe logger output, false to allow normal log capture. |
| bool | replace | True to replace an existing orchestration helper registration. |
Returns
| Type | Description |
|---|---|
| Mocker | The current Mocker instance. |
Remarks
This helper keeps assertions on the normal LogEntries and TestClassExtensions.VerifyLogged(FastMoq.Mocker, LogLevel, string, TimesSpec?) surface. When TaskOrchestrationContext has not already been resolved, this helper can register a concrete replay-safe orchestration context on Moq, NSubstitute, or reflection paths. If a tracked orchestration mock already exists, the active provider must support FastMoq's tracked-property configuration contract for the protected Durable logger factory getter; the built-in Moq provider supports that path today.
AddTaskOrchestrationReplaySafeLogging(IFastMock, ILoggerFactory, bool)
Configures a tracked TaskOrchestrationContext mock so CreateReplaySafeLogger(string) can use the supplied logger factory and replay state.
Declaration
public static IFastMock AddTaskOrchestrationReplaySafeLogging(this IFastMock fastMock, ILoggerFactory loggerFactory, bool isReplaying = false)
Parameters
| Type | Name | Description |
|---|---|---|
| IFastMock | fastMock | The tracked mock whose orchestration logging behavior should be configured. |
| ILoggerFactory | loggerFactory | The logger factory that replay-safe logger creation should delegate to. |
| bool | isReplaying | True to suppress replay-safe logger output, false to allow normal log capture. |
Returns
| Type | Description |
|---|---|
| IFastMock | The current tracked mock. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Thrown when |