コード例 #1
0
        public void TestFreedChannelRemovedFromDefault()
        {
            track.Dispose();
            bass.Update();

            Assert.That(BassMix.ChannelGetMixer(getHandle()), Is.Zero);
        }
コード例 #2
0
        public void TestStopWhenDisposed()
        {
            track.StartAsync();
            bass.Update();

            Thread.Sleep(50);
            bass.Update();

            Assert.IsTrue(track.IsAlive);
            Assert.IsTrue(track.IsRunning);

            track.Dispose();
            bass.Update();

            Assert.IsFalse(track.IsAlive);
            Assert.IsFalse(track.IsRunning);

            double expectedTime = track.CurrentTime;

            Thread.Sleep(50);

            Assert.AreEqual(expectedTime, track.CurrentTime);
        }