Files
maraphon-app/tests/Marathon.Domain.Tests/Enums/AnomalyKindExtensionsTests.cs
T
alexei.dolgolyov c9eee9f907 fix(anomaly): exclude non-directional kinds from grading and backtest
Review follow-up (HIGH): the three detectors fed the same evaluator/backtest, but
SuspensionFreeze is non-directional (favourite unchanged) — grading it as "favourite
won" polluted the hit-rate with the base favourite-win rate, and its high frozen-ness
score always cleared the backtest threshold.

- Add AnomalyKind.IsDirectional() (flip + steam = true, freeze = false).
- AnomalyOutcomeEvaluator returns Unresolved for non-directional kinds (favourites
  still surfaced for display) so they don't distort calibration.
- RunBacktestUseCase skips non-directional anomalies when building candidates.
- Tests for the classification, the evaluator path, and the backtest skip.
2026-05-29 01:25:16 +03:00

17 lines
457 B
C#

using FluentAssertions;
using Marathon.Domain.Enums;
namespace Marathon.Domain.Tests.Enums;
public sealed class AnomalyKindExtensionsTests
{
[Theory]
[InlineData(AnomalyKind.SuspensionFlip, true)]
[InlineData(AnomalyKind.SteamMove, true)]
[InlineData(AnomalyKind.SuspensionFreeze, false)]
public void IsDirectional_Should_ClassifyKinds(AnomalyKind kind, bool expected)
{
kind.IsDirectional().Should().Be(expected);
}
}