using Nonemm.Core; using Nonemm.Core.Country; namespace Nonemm.Contests.Tests; /// A country file and QSO builder small enough to read, so a scoring test says /// what it is testing rather than how to build a contact. public static class TestLog { public const string Countries = """ Germany: 14: 28: EU: 51.00: -10.00: -1.0: DL: DA,DB,DC,DD,DE,DF,DG,DH,DJ,DK,DL,DM,DO,DP,DQ,DR; Italy: 15: 28: EU: 42.83: -12.83: -1.0: I: I,IK,IZ; United States: 05: 08: NA: 37.60: 91.87: 5.0: K: K,W,N,AA,K6(3)[6]; Canada: 05: 09: NA: 44.35: 78.75: 5.0: VE: VE,VA; Japan: 25: 45: AS: 36.40: -138.38: -9.0: JA: JA,JH,JR,7K; Brazil: 11: 15: SA: -10.00: 55.00: 3.0: PY: PY,PP; Asiatic Russia: 17: 30: AS: 55.88: -84.10: -7.0: UA9: RM8,RM9,RM0,UA8,UA9,UA0,R8,R9,R0; Slovak Republic: 15: 28: EU: 48.67: -19.50: -1.0: OM: OM; Czech Republic: 15: 28: EU: 49.80: -15.47: -1.0: OK: OK,OL; """; public static readonly CountryFile CountryFile = CountryFile.Parse(Countries); public static readonly StationInfo Germany = new() { Callsign = "DL1ABC", CqZone = 14, ItuZone = 28, Continent = "EU", CountryPrefix = "DL", }; public static readonly StationInfo UnitedStates = new() { Callsign = "K1ABC", CqZone = 5, ItuZone = 8, Continent = "NA", CountryPrefix = "K", State = "CT", ArrlSection = "CT", }; public static readonly StationInfo Slovakia = new() { Callsign = "OM5M", CqZone = 15, ItuZone = 28, Continent = "EU", CountryPrefix = "OM", County = "BRA", }; public static Qso Contact( string call, double kilohertz = 14_025, Mode? mode = null, int zone = 0, int number = 0, string exchange = "", string section = "", DateTime? at = null) => new() { Id = Qso.NewId(), TimestampUtc = at ?? new DateTime(2026, 5, 30, 12, 0, 0, DateTimeKind.Utc), Call = Callsign.Parse(call), Frequency = Frequency.FromKilohertz(kilohertz), Mode = mode ?? Modes.Cw, ContestName = "TEST", Zone = zone, ReceivedNumber = number, Exchange1 = exchange, Section = section, }; }