using Nonemm.Digital; namespace Nonemm.Digital.Tests; /// The command line N1MM builds, checked switch by switch. public class MmttyOptionsTests { [Fact] public void MmttyIsStartedTheWayN1mmStartsIt() { MmttyOptions options = new() { EnginePath = "/opt/mmtty/mmtty.exe" }; Assert.Equal(@"""C:\mmtty\mmtty.exe"" -r -Z", options.CommandLine(@"C:\mmtty\mmtty.exe")); Assert.Equal("RTTY Engine 1", options.Title); Assert.False(options.IsTwoTone); } [Fact] public void AWindowThatIsNotOnTopAsksForIt() { MmttyOptions options = new() { EnginePath = "/opt/mmtty/mmtty.exe", Window = EngineWindow.Small, OnTop = false, }; Assert.Equal(@"""C:\m\mmtty.exe"" -t -a -Z", options.CommandLine(@"C:\m\mmtty.exe")); } [Fact] public void TwoToneTakesNoneOfMmttysSwitchesAndNamesItsOwnWindow() { MmttyOptions options = new() { EnginePath = "/opt/2tone/2Tone.exe", Number = 2 }; Assert.True(options.IsTwoTone); Assert.Equal(@"""C:\2Tone.exe"" -r", options.CommandLine(@"C:\2Tone.exe")); Assert.Equal("DI2 G3YYD 2Tone", options.WindowTitle); } }