Both are in the station's log and neither could be opened. The rules are written from the published ones and checked by replaying the log. YOTA scores a contact by the age the other operator sends: 13 points down to 10 for anyone 25 or under, whatever the continent, and 1 point or 3 for everyone else. Every age worked on a band is a multiplier. The 2024, 2025 and 2026 logs come out to the contact. OK/OM DX is the first contest whose exchange differs by the other station's country: a county from OK and OM stations, a serial number from everyone else, in the two columns N1MM keeps them in, and `SkipsField` walks the entry window past the box that does not apply. Points depend on which side the operator is on, and Czechia and Slovakia count as the two countries they are. The 2023 log comes out to the contact. The Cabrillo exchange now gets the entry, because YOTA sends an age that only the contest setup knows. Two differences are left in the log, both from the .udc files the operator used: their YOTA file only lists ages 7 to 25, so a younger operator scored as an adult, and one OK/OM log was made with the file for stations outside OK and OM while signing an OM call. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RoGtneMQaz4M9w7Kk49AVD
50 lines
1.7 KiB
C#
50 lines
1.7 KiB
C#
using Nonemm.Contests.Rules;
|
|
using Nonemm.Core;
|
|
|
|
namespace Nonemm.Contests.Tests;
|
|
|
|
public class YotaTests
|
|
{
|
|
private static ContestLog LogFor(StationInfo me) => new(new Yota(), me, TestLog.CountryFile);
|
|
|
|
private static Qso Contact(string call, string age, double kilohertz = 14_025, Mode? mode = null) =>
|
|
TestLog.Contact(call, kilohertz, mode: mode, exchange: age);
|
|
|
|
[Theory]
|
|
[InlineData("9", 13)]
|
|
[InlineData("12", 13)]
|
|
[InlineData("13", 12)]
|
|
[InlineData("16", 12)]
|
|
[InlineData("17", 11)]
|
|
[InlineData("21", 11)]
|
|
[InlineData("22", 10)]
|
|
[InlineData("25", 10)]
|
|
[InlineData("26", 1)]
|
|
public void AYoungOperatorIsWorthMore(string age, int expected) =>
|
|
Assert.Equal(expected, LogFor(TestLog.Germany).Judge(Contact("IK2XYZ", age)).Points);
|
|
|
|
/// The age pays the same from anywhere; only the contacts with everyone
|
|
/// else are scored by continent.
|
|
[Fact]
|
|
public void AgeBeatsTheContinent()
|
|
{
|
|
ContestLog log = LogFor(TestLog.Germany);
|
|
Assert.Equal(13, log.Judge(Contact("JA1XYZ", "11")).Points);
|
|
Assert.Equal(3, log.Judge(Contact("JA1XYZ", "44")).Points);
|
|
Assert.Equal(1, log.Judge(Contact("IK2XYZ", "44")).Points);
|
|
}
|
|
|
|
[Fact]
|
|
public void AnAgeCountsOncePerBandWhateverTheMode()
|
|
{
|
|
ContestLog log = LogFor(TestLog.Germany);
|
|
log.Add(Contact("IK2XYZ", "19"));
|
|
Assert.Empty(log.Judge(Contact("DL9XYZ", "19", mode: Modes.Usb)).NewMultipliers);
|
|
Assert.Single(log.Judge(Contact("DL9XYZ", "19", 7_025)).NewMultipliers);
|
|
}
|
|
|
|
[Fact]
|
|
public void AnExchangeThatIsNoAgeBringsNoMultiplier() =>
|
|
Assert.Empty(LogFor(TestLog.Germany).Judge(Contact("IK2XYZ", "")).NewMultipliers);
|
|
}
|