コード例 #1
0
        public void SetDefaultChannel_InvalidTest(byte channel)
        {
            IMidiOutputDevice device = MidiDeviceLocator.SelectForOutput(0);

            Assume.That(device != null);

            Assert.Throws <ArgumentException>(() => device.SetDefaultChannel(channel));
        }
コード例 #2
0
        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);
            }
        }