using Nonemm.Contests.Rules; using Nonemm.Core; namespace Nonemm.Contests.Tests; public class FrenchRefTests { private static ContestLog LogFor() => new(new FrenchRef(ModeCategory.Phone), TestLog.Germany, TestLog.CountryFile); private static Qso Contact(string call, string department = "", string number = "") => TestLog.Contact(call, mode: Modes.Usb, section: department, exchange: number); [Theory] [InlineData("F5XYZ", 1)] [InlineData("IK2XYZ", 1)] [InlineData("JA1XYZ", 3)] public void AStationOutsideFranceScoresByContinent(string call, int expected) => Assert.Equal(expected, LogFor().Judge(Contact(call, department: "03")).Points); /// A French department is the multiplier, and so is a French entity /// overseas, but an ordinary DX contact is neither. [Fact] public void OnlyFranceBringsAMultiplier() { ContestLog log = LogFor(); Assert.Equal("03", log.Judge(Contact("F5XYZ", department: "03")).NewMultipliers.Single().Value); Assert.Empty(log.Judge(Contact("JA1XYZ", number: "001")).NewMultipliers); } }