public void SetDefaultChannel_InvalidTest(byte channel) { IMidiOutputDevice device = MidiDeviceLocator.SelectForOutput(0); Assume.That(device != null); Assert.Throws <ArgumentException>(() => device.SetDefaultChannel(channel)); }
public void SetDefaultChannelTest() { IMidiOutputDevice device = MidiDeviceLocator.SelectForOutput(0); Assume.That(device != null); for (byte i = 1; i <= 16; i++) { Assert.AreSame(device, device.SetDefaultChannel(i)); Assert.AreEqual(i, device.DefaultChannel); } }