Table of Contents

Interface ITestInspect

Namespace
Mokkit.Inspect
Assembly
Mokkit.dll

Represents the fluent interface for chaining inspect operations in the AAA (Arrange-Act-Assert) pattern. This interface allows for sequential execution of assertions and verifications through method chaining.

public interface ITestInspect

Extension Methods

Methods

GetAwaiter()

Gets an awaiter that allows the inspect chain to be awaited using the async/await pattern. This enables the use of 'await' directly on the inspect chain.

ITestInspectAwaiter GetAwaiter()

Returns

ITestInspectAwaiter

An awaiter for the inspect operation chain.

Then(InspectAsyncFn)

Chains an asynchronous inspect function to be executed in sequence.

ITestInspect Then(InspectAsyncFn inspectFn)

Parameters

inspectFn InspectAsyncFn

The asynchronous inspect function to execute.

Returns

ITestInspect

The current Mokkit.Inspect.ITestInspect instance for method chaining.

Then(InspectFn)

Chains a synchronous inspect function to be executed in sequence.

ITestInspect Then(InspectFn inspectFn)

Parameters

inspectFn InspectFn

The synchronous inspect function to execute.

Returns

ITestInspect

The current Mokkit.Inspect.ITestInspect instance for method chaining.

ThenAll(params InspectAsyncFn[])

Chains a group of asynchronous inspect functions that execute concurrently with one another. Steps chained before and after run sequentially; only the functions passed to this single call overlap.

ITestInspect ThenAll(params InspectAsyncFn[] inspectFns)

Parameters

inspectFns InspectAsyncFn[]

The asynchronous inspect functions to run in parallel.

Returns

ITestInspect

The current Mokkit.Inspect.ITestInspect instance for method chaining.

ThenAll(params InspectFn[])

Chains a group of synchronous inspect functions that execute concurrently with one another. Steps chained before and after run sequentially; only the functions passed to this single call overlap.

ITestInspect ThenAll(params InspectFn[] inspectFns)

Parameters

inspectFns InspectFn[]

The synchronous inspect functions to run in parallel.

Returns

ITestInspect

The current Mokkit.Inspect.ITestInspect instance for method chaining.

ThenAll(params Func<ITestInspect, ITestInspect>[])

Chains a group of inspect branches that execute concurrently with one another. Each branch is built with the same fluent inspect helpers and runs its own steps sequentially; the branches overlap. Use this to parallelize a chain composed from extension-method helpers (e.g. b => b.ApiClient(id, ...)).

ITestInspect ThenAll(params Func<ITestInspect, ITestInspect>[] branches)

Parameters

branches Func<ITestInspect, ITestInspect>[]

The branch builders; each receives a fresh sub-chain bound to the same stage.

Returns

ITestInspect

The current Mokkit.Inspect.ITestInspect instance for method chaining.

ThenValueScope<T>(T, InspectScopeAsyncFn?)

Creates a value-scoped inspection that operates on a specific value. This allows for focused assertions on a particular value within a scoped context.

ITestInspectScope<T> ThenValueScope<T>(T value, InspectScopeAsyncFn? inspectScopeFn = null)

Parameters

value T

The value to inspect within the scope.

inspectScopeFn InspectScopeAsyncFn?

Optional scoped inspect function to execute within the value scope.

Returns

ITestInspectScope<T>

A Mokkit.Inspect.ITestInspectScope`1 for value-scoped operations.

Type Parameters

T

The type of the value to inspect.

ThenValueScope<T, TContext>(T, TContext, InspectScopeAsyncFn?)

Creates a value-scoped inspection that operates on a specific value with additional context. This allows for focused assertions on a particular value with contextual information.

ITestInspectScopeWithContext<T, TContext> ThenValueScope<T, TContext>(T value, TContext context, InspectScopeAsyncFn? inspectScopeFn = null)

Parameters

value T

The value to inspect within the scope.

context TContext

Additional context information for the inspection.

inspectScopeFn InspectScopeAsyncFn?

Optional scoped inspect function to execute within the value scope.

Returns

ITestInspectScopeWithContext<T, TContext>

A Mokkit.Inspect.ITestInspectScopeWithContext`2 for value-scoped operations with context.

Type Parameters

T

The type of the value to inspect.

TContext

The type of the context object.