Add the twelve contests left in the station's log

REF, the Ukrainian DX contest, the BARTG Sprint, ARRL 10M, Russian DX RTTY,
RDAC, YO DX HF, Oceania DX, IARU Region 1 Field Day, SARTG RTTY, All Asian and
SA 10. Every contest name in the log now opens, and every one of these but
Field Day scores its log contact for contact as N1MM did.

Most are written from N1MM's own class and checked against the log. Three
things the log settled that the class does not say plainly: ARRL 10M counts its
multipliers once per mode rather than once, the BARTG Sprint counts a continent
once in the contest while its countries and call areas count per band, and RDAC
counts nothing but the districts and scores nothing for a station that sends
none.

All Asian and SA 10 have no class in N1MM, which logs them from a .udc file, so
those two are written from the published rules and the log. docs/unfinished.md
lists what is still not settled.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RoGtneMQaz4M9w7Kk49AVD
This commit is contained in:
2026-08-31 09:43:03 +00:00
parent 7d9bc05e9a
commit 264036f0f2
24 changed files with 1208 additions and 11 deletions

View File

@@ -0,0 +1,38 @@
using Nonemm.Contests.Rules;
using Nonemm.Core;
namespace Nonemm.Contests.Tests;
public class Arrl10MetreTests
{
private static ContestLog LogFor() => new(new Arrl10Metre(), TestLog.Germany, TestLog.CountryFile);
private static Qso Contact(string call, Mode mode, string state = "", string number = "") =>
TestLog.Contact(call, 28_025, mode: mode, section: state, exchange: number);
[Fact]
public void CwIsWorthFourAndPhoneTwo()
{
ContestLog log = LogFor();
Assert.Equal(4, log.Judge(Contact("K1ABC", Modes.Cw, state: "CT")).Points);
Assert.Equal(2, log.Judge(Contact("K1ABC", Modes.Usb, state: "CT")).Points);
}
/// The contest is one band and counts its multipliers once per mode.
[Fact]
public void AMultiplierCountsOncePerMode()
{
ContestLog log = LogFor();
log.Add(Contact("K1ABC", Modes.Cw, state: "CT"));
Assert.Empty(log.Judge(Contact("K2ABC", Modes.Cw, state: "CT")).NewMultipliers);
Assert.Single(log.Judge(Contact("K2ABC", Modes.Usb, state: "CT")).NewMultipliers);
}
[Fact]
public void AStationWithNoStateBringsItsCountry() =>
Assert.Equal(
[2],
LogFor().Judge(Contact("JA1XYZ", Modes.Cw, number: "042")).NewMultipliers
.Select(m => m.Index)
.ToList());
}