Example #1
0
        public async Task MuteChangedTest()
        {
            if (Mopidy.Settings.ConnectionType != Mopidy.Settings.Connection.WebSocket)
            {
                return;
            }

            var res1 = await Mixer.GetMute();

            Assert.True(res1.Succeeded);

            var recieved = false;
            var changed  = false;

            CoreListener.MuteChanged += (sender, ev) =>
            {
                recieved = true;

                if (ev.Mute != res1.Result)
                {
                    changed = true;
                }
            };

            var res2 = await Mixer.SetMute(!res1.Result);

            Assert.True(res2.Succeeded);
            Assert.True(res2.Result);
            await Task.Delay(WaitMsec);

            Assert.True(recieved);
            Assert.True(changed);
        }
Example #2
0
        public async Task SetMuteTest()
        {
            var res1 = await Mixer.GetMute();

            Assert.True(res1.Succeeded);

            var res2 = await Mixer.SetMute(!res1.Result);

            Assert.True(res2.Succeeded);
            Assert.True(res2.Result);

            var res3 = await Mixer.GetMute();

            Assert.True(res3.Succeeded);
            Assert.True(res1.Result != res3.Result);

            await Task.Delay(2000);
        }
Example #3
0
        public async Task GetMuteTest()
        {
            var res = await Mixer.GetMute();

            Assert.True(res.Succeeded);
        }