public void AlarmDataTest_EnableOrDisable() { // Arrange var f = new MainForm(); var ad = new AlarmData(f.MyDataFile, f.MyDataFile.MultiAudioPlayer); ad.Enabled = false; ad.EnableOrDisable(); // Assert Assert.IsTrue(ad.Enabled); }