Skip to content

Conversation

@StuartFerguson
Copy link
Member

  • Updated FloatDomainServiceTests to utilize IAggregateService, simplifying test setup and reducing dependencies.
  • Replaced multiple IAggregateRepository dependencies in FloatDomainService with a single IAggregateService for improved maintainability.
  • Introduced IAggregateRepositoryResolver for dynamic repository resolution.
  • Added AggregateService for aggregate retrieval, saving, and caching.
  • Updated project file to include prometheus-net for metrics collection.
  • Modified RepositoryRegistry to register new services for dependency injection.
  • Enhanced Startup.cs to include Prometheus middleware for monitoring.
  • Introduced AggregateMemoryCache for efficient aggregate caching.

- Updated FloatDomainServiceTests to utilize IAggregateService, simplifying test setup and reducing dependencies.
- Replaced multiple IAggregateRepository dependencies in FloatDomainService with a single IAggregateService for improved maintainability.
- Introduced IAggregateRepositoryResolver for dynamic repository resolution.
- Added AggregateService for aggregate retrieval, saving, and caching.
- Updated project file to include prometheus-net for metrics collection.
- Modified RepositoryRegistry to register new services for dependency injection.
- Enhanced Startup.cs to include Prometheus middleware for monitoring.
- Introduced AggregateMemoryCache for efficient aggregate caching.
This commit refactors the MerchantDomainServiceTests class to replace multiple IAggregateRepository dependencies with a single IAggregateService dependency, simplifying the test setup and reducing the number of mocked repositories. The MerchantDomainService constructor has been updated to accept the new service, promoting a more cohesive design.

Various test methods have been modified to utilize AggregateService methods for fetching and saving aggregates, ensuring alignment with the new architecture. The logic within MerchantDomainService methods has also been updated accordingly.

All tests have been adjusted to validate expected outcomes, confirming that functionality remains intact while enhancing code structure and maintainability.
@StuartFerguson StuartFerguson merged commit 1ae1d32 into master Apr 18, 2025
5 checks passed
@github-actions github-actions bot deleted the task/#770_aggregate_service_first_cut branch June 18, 2025 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants