Background
Timestamp Locator extraction, merged in #664 rewired TimeSpreadCalculator off ILogWindow and onto the pure TimestampLocator + ITimestampSource seam. That was the blocker to testing it — the calculator no longer needs a WinForms LogWindow to run, only a fake ITimestampSource, the same seam TimestampLocatorTests.cs already exercises.
It remains untested. DoCalc and DoCalcViaTime (the two spread algorithms — line-mode and time-mode) have no coverage, and DoCalcViaTime carries a pre-existing //TODO Refactor this method marker of its own.
What to build
Test coverage for TimeSpreadCalculator's two calculation paths (DoCalc, DoCalcViaTime) against a fake ITimestampSource + TimestampLocator, in the same style as src/LogExpert.Tests/Timestamp/TimestampLocatorTests.cs. The worker-thread/event-driven surface (WorkerFx, _calcEvent, _lineCountEvent) needs its own think about whether to test through it or extract the calculation from the threading — do that thinking as part of this ticket, not before it.
Acceptance criteria
Blocked by
None — TimeSpreadCalculator is already rewired onto the testable seam.
Background
Timestamp Locator extraction, merged in #664 rewired
TimeSpreadCalculatoroffILogWindowand onto the pureTimestampLocator+ITimestampSourceseam. That was the blocker to testing it — the calculator no longer needs a WinFormsLogWindowto run, only a fakeITimestampSource, the same seamTimestampLocatorTests.csalready exercises.It remains untested.
DoCalcandDoCalcViaTime(the two spread algorithms — line-mode and time-mode) have no coverage, andDoCalcViaTimecarries a pre-existing//TODO Refactor this methodmarker of its own.What to build
Test coverage for
TimeSpreadCalculator's two calculation paths (DoCalc,DoCalcViaTime) against a fakeITimestampSource+TimestampLocator, in the same style assrc/LogExpert.Tests/Timestamp/TimestampLocatorTests.cs. The worker-thread/event-driven surface (WorkerFx,_calcEvent,_lineCountEvent) needs its own think about whether to test through it or extract the calculation from the threading — do that thinking as part of this ticket, not before it.Acceptance criteria
DoCalc(line mode) has test coverage: empty file, single line, no timestamps, uniform spacing, irregular gapsDoCalcViaTime(time mode) has equivalent coverageBlocked by
None —
TimeSpreadCalculatoris already rewired onto the testable seam.