Summary
SystemTray.Linux has no unit tests. Test project exists but contains only empty placeholder test.
Problem
- Current state: 0% test coverage
- Impact: No safety net for refactoring, regressions not caught, violates quality standards
- Target: 80%+ coverage for business logic (per refactoring guide)
Proposed Solution
Add comprehensive unit tests for all public APIs:
Priority 1 - Core functionality (Target: 90%+)
Priority 2 - Animation & State (Target: 85%+)
Priority 3 - Internal (Target: 70%+)
Test Strategy
- Use Moq for ILogger, IIconRenderer mocking
- Integration tests for D-Bus communication (may need separate project)
- Test error handling (null params, disposed objects, file not found)
Files Affected
tests/SystemTray.Linux.Tests/ - add new test files:
TrayIconManagerTests.cs
TrayIconTests.cs
IconRendererTests.cs
StatusNotifierItemHandlerTests.cs
Acceptance Criteria
Summary
SystemTray.Linux has no unit tests. Test project exists but contains only empty placeholder test.
Problem
Proposed Solution
Add comprehensive unit tests for all public APIs:
Priority 1 - Core functionality (Target: 90%+)
TrayIconManager- create/get/remove iconsTrayIcon- initialize, set icon, show/hide, disposeIconRenderer- render, cache, pre-cachePriority 2 - Animation & State (Target: 85%+)
TrayIcon.StartAnimation/StopAnimationTrayIcon.SetIconwith different statesPriority 3 - Internal (Target: 70%+)
StatusNotifierItemHandler- D-Bus message handlingTest Strategy
Files Affected
tests/SystemTray.Linux.Tests/- add new test files:TrayIconManagerTests.csTrayIconTests.csIconRendererTests.csStatusNotifierItemHandlerTests.csAcceptance Criteria
MethodName_Scenario_ExpectedResultUnitTest1.cs