Table of Contents

Namespace Trellis.Testing.Fakes

Classes

FakeRepository<TAggregate, TId>

In-memory fake repository for testing aggregates. Provides a simple in-memory store with domain event tracking.

FakeSharedResourceLoader<TResource, TId>

In-memory fake implementation of SharedResourceLoaderById<TResource, TId> that delegates to a FakeRepository<TAggregate, TId>. Use in application-layer tests to wire resource-based authorization without hand-writing a loader per command.

TestActorProvider

Mutable IActorProvider for integration and authorization testing. Stores the current actor in an AsyncLocal<T> so parallel tests using overlapping WithActor(Actor) scopes never interfere with each other.

TestActorScope

Captures the current Actor and restores it on dispose. Created by WithActor(Actor). Supports both await using and using patterns.