using Nonemm.Contests.Rules; using Nonemm.Core; namespace Nonemm.Contests.Tests; public class IotaTests { private static ContestLog LogFor() => new(new Iota(), TestLog.Germany, TestLog.CountryFile); private static Qso Contact(string call, string reference, double kilohertz = 14_025, Mode? mode = null) => TestLog.Contact(call, kilohertz, mode: mode, section: reference); [Fact] public void AnIslandStationIsWorthFifteenAndEveryoneElseTwo() { ContestLog log = LogFor(); Assert.Equal(15, log.Judge(Contact("IK2XYZ", "EU025")).Points); Assert.Equal(2, log.Judge(Contact("IK2XYZ", "")).Points); } [Fact] public void AReferenceCountsOncePerBandAndMode() { ContestLog log = LogFor(); log.Add(Contact("IK2XYZ", "EU025")); Assert.Empty(log.Judge(Contact("IK3XYZ", "EU025")).NewMultipliers); Assert.Single(log.Judge(Contact("IK3XYZ", "EU025", mode: Modes.Usb)).NewMultipliers); Assert.Single(log.Judge(Contact("IK3XYZ", "EU025", 7_025)).NewMultipliers); } }