Skip to content

Adds resolver insertion and SimpleTypeResolver base#441

Merged
Keboo merged 1 commit intomasterfrom
resolverImprovments
Feb 24, 2026
Merged

Adds resolver insertion and SimpleTypeResolver base#441
Keboo merged 1 commit intomasterfrom
resolverImprovments

Conversation

@Keboo
Copy link
Copy Markdown
Collaborator

@Keboo Keboo commented Feb 24, 2026

Enhances resolver customization by:

  • Introducing a SimpleTypeResolver base class, simplifying the creation of custom resolvers by handling exact type, base type, and interface matching.
  • Refactoring HttpClientResolver and SelfResolver to leverage the new SimpleTypeResolver, improving code consistency and maintainability.
  • Adding InsertResolverAfter and InsertResolverBefore methods to AutoMocker, providing precise control over the resolver chain order.

Introduces `InsertResolverAfter` and `InsertResolverBefore` methods to `AutoMocker`, enabling dynamic modification of the resolver pipeline. This allows users to easily inject custom resolution logic at specific points relative to existing resolvers.

Adds a new abstract base class, `SimpleTypeResolver`, which provides common functionality for resolving specific types, including options to match base types and implemented interfaces. This reduces boilerplate when creating new resolvers and promotes cleaner code.

Refactors `HttpClientResolver` and `SelfResolver` to leverage the new `SimpleTypeResolver` abstraction, making their implementations more concise and consistent.

Includes comprehensive unit tests for the new insertion methods and the refactored resolvers to ensure correct behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant