Take a QTC header that is only a series number as ten lines

An operator copying a header off the air often types the series number and
nothing else. That read as a header the program could not parse, so the box
went yellow and Close refused to log the series.

N1MM fills the count in: "If he only types the batch number without the
forward slash and count, the program will assume the count is 10."

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0157i7PiZyqBkquxS9A6FTdQ
This commit is contained in:
2026-09-10 19:30:47 +00:00
co-authored by Claude Opus 5
parent 265f90ccd7
commit 9b3e10d127
2 changed files with 26 additions and 7 deletions
+13 -1
View File
@@ -314,9 +314,21 @@ public class QtcTrafficTests
Assert.Equal(10, count);
}
/// N1MM fills in the count when the operator types the series number
/// alone, because ten is the usual series.
[Theory]
[InlineData("87")]
[InlineData("QTC 87")]
public void ASeriesNumberOnItsOwnMeansTenLines(string text)
{
(int series, int count) = Assert.IsType<(int, int)>(QtcTraffic.ReadHeader(text));
Assert.Equal(87, series);
Assert.Equal(10, count);
}
[Theory]
[InlineData("")]
[InlineData("87")]
[InlineData("87/11")]
[InlineData("abc/10")]
public void AHeaderThatIsNotOneReadsAsNothing(string text) =>