using Nonemm.Core; namespace Nonemm.Spotting.Tests; public class SpotSnrTests { private static Spot Commented(string comment, string spotter = "OK1TEST") => new(Callsign.Parse("DL1ABC"), Frequency.FromKilohertz(14_025), DateTime.UtcNow, SpotSource.Cluster, spotter, comment); [Fact] public void ASkimmerCommentGivesTheDecibels() { Assert.Equal(24, Commented("CW 24 dB 28 WPM CQ").Snr); } [Fact] public void ACommentWithNoDecibelsHasNoSnr() { Assert.Null(Commented("up 2").Snr); } [Fact] public void ASpotterEndingInHashIsASkimmer() { Assert.True(Commented("", "DL1ABC-#").IsSkimmer); Assert.False(Commented("", "DL1ABC").IsSkimmer); } }