Skip to content

refactor(di): remove mock DI container, use common_system service_container#485

Merged
kcenon merged 1 commit into
mainfrom
refactor/issue-368-verify-service-container-integration
Feb 23, 2026
Merged

refactor(di): remove mock DI container, use common_system service_container#485
kcenon merged 1 commit into
mainfrom
refactor/issue-368-verify-service-container-integration

Conversation

@kcenon

@kcenon kcenon commented Feb 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • Remove ~200-line mock service_container_interface from test_di_container.cpp
  • Rewrite all DI container tests to use common_system::di::service_container directly
  • Verify service_registration.h already correctly integrates with service_container
  • No internal DI containers remain in monitoring_system

Closes kcenon/common_system#368

Context

This is Phase 4 of the DI container consolidation effort (kcenon/common_system#363).
The monitoring_system already properly uses common_system::service_container via
service_registration.h. The only cleanup needed was removing a mock DI implementation
from the test file that duplicated service_container functionality.

Verification Summary

Criterion Status
No internal DI containers remain Verified - mock removed
service_registration.h follows ecosystem conventions Verified - uses IServiceContainer& properly
All DI tests pass 26/26 passed (14 container + 12 service registration)

Test Plan

  • All 26 DI-related tests pass locally
  • DIContainerTest suite: 14 tests using real service_container
  • MonitorServiceRegistrationTest suite: 12 tests (unchanged, already correct)
  • CI build passes on all platforms

…ntainer

Remove ~200-line mock service_container_interface implementation
from test_di_container.cpp and rewrite all tests to use the real
common_system::di::service_container.

Changes:
- Remove stub service_container_interface, service_locator,
  create_lightweight_container, create_thread_system_adapter
- Rewrite 14 tests using service_container API directly
- Add tests for: resolve_or_null, unregister, duplicate detection,
  registered_services descriptors, freeze behavior
- Remove mock-specific tests (named services, service locator,
  thread system adapter factory)

All 26 DI-related tests pass (14 container + 12 service registration).

Part of kcenon/common_system#368
@kcenon kcenon merged commit 0b562ea into main Feb 23, 2026
21 checks passed
@kcenon kcenon deleted the refactor/issue-368-verify-service-container-integration branch February 23, 2026 12:16
kcenon added a commit that referenced this pull request Apr 13, 2026
…ntainer (#485)

Remove ~200-line mock service_container_interface implementation
from test_di_container.cpp and rewrite all tests to use the real
common_system::di::service_container.

Changes:
- Remove stub service_container_interface, service_locator,
  create_lightweight_container, create_thread_system_adapter
- Rewrite 14 tests using service_container API directly
- Add tests for: resolve_or_null, unregister, duplicate detection,
  registered_services descriptors, freeze behavior
- Remove mock-specific tests (named services, service locator,
  thread system adapter factory)

All 26 DI-related tests pass (14 container + 12 service registration).

Part of kcenon/common_system#368
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.

refactor(di): Phase 4 — verify monitoring_system service_container integration

1 participant