Add the core, contest, storage and format layers

Frequencies, bands, modes, callsigns, grid squares and the country file live in
Nonemm.Core. Nonemm.Contests holds the scoring engine and CQ WW and CQ WPX.
Nonemm.Storage writes N1MM's DXLOG schema, and Nonemm.Formats writes Cabrillo
3.0 and reads and writes ADIF.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Erik
2026-08-27 10:27:51 +00:00
commit 0f84bc8972
68 changed files with 3823 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
using Nonemm.Core;
namespace Nonemm.Core.Tests;
public class BandsTests
{
[Theory]
[InlineData(1830, "160M")]
[InlineData(3510.5, "80M")]
[InlineData(14025, "20M")]
[InlineData(28499, "10M")]
[InlineData(50110, "6M")]
[InlineData(144200, "2M")]
public void FrequencyLandsOnItsBand(double kilohertz, string expected) =>
Assert.Equal(expected, Bands.ForFrequency(Frequency.FromKilohertz(kilohertz))?.Name);
[Fact]
public void FrequencyOutsideEveryAllocationHasNoBand() =>
Assert.Null(Bands.ForFrequency(Frequency.FromKilohertz(12000)));
[Fact]
public void BandEdgesAreIncluded()
{
Assert.Equal("20M", Bands.ForFrequency(Frequency.FromKilohertz(14000))?.Name);
Assert.Equal("20M", Bands.ForFrequency(Frequency.FromKilohertz(14350))?.Name);
}
[Theory]
[InlineData(1.8, "160M")]
[InlineData(5, "60M")]
[InlineData(76000, "4MM")]
public void N1mmBandLabelFindsTheBand(double label, string expected) =>
Assert.Equal(expected, Bands.ByLabel(label)?.Name);
}