using Nonemm.Contests.Rules; using Nonemm.Core; namespace Nonemm.Contests.Tests; public class OceaniaDxTests { private static ContestLog LogFor() => new(new OceaniaDx(ModeCategory.Phone), TestLog.Germany, TestLog.CountryFile); [Theory] [InlineData(1_830, 20)] [InlineData(3_650, 10)] [InlineData(7_050, 5)] [InlineData(14_150, 1)] [InlineData(21_150, 2)] [InlineData(28_150, 3)] public void EachBandOfTheContestHasItsOwnPoints(double kilohertz, int expected) => Assert.Equal( expected, LogFor().Judge(TestLog.Contact("VK4XYZ", kilohertz, mode: Modes.Usb)).Points); /// The contest is on six bands. A contact on any other — the WARC bands, /// 6 metres — is worth nothing, which is where N1MM's table ends too. [Theory] [InlineData(10_120)] [InlineData(18_100)] [InlineData(24_930)] [InlineData(50_150)] public void ABandOutsideTheContestScoresNothing(double kilohertz) => Assert.Equal( 0, LogFor().Judge(TestLog.Contact("VK4XYZ", kilohertz, mode: Modes.Usb)).Points); /// One side of the contact has to be in Oceania. [Fact] public void AContactOutsideOceaniaScoresNothing() { Verdict verdict = LogFor().Judge(TestLog.Contact("IK2XYZ", mode: Modes.Usb)); Assert.Equal(0, verdict.Points); Assert.Empty(verdict.NewMultipliers); } }