public async Task SetConsumeTest() { var res1 = await Tracklist.GetConsume(); Assert.True(res1.Succeeded); var res2 = await Tracklist.SetConsume(!res1.Result); Assert.True(res2); var res3 = await Tracklist.GetConsume(); Assert.True(res3.Succeeded); Assert.True(res1.Result != res3.Result); }
public async Task GetConsumeTest() { var res = await Tracklist.GetConsume(); Assert.True(res.Succeeded); }
public async Task OptionsChangedTest() { if (Mopidy.Settings.ConnectionType != Mopidy.Settings.Connection.WebSocket) { return; } var res1 = await Tracklist.GetConsume(); Assert.True(res1.Succeeded); var res2 = await Tracklist.GetRandom(); Assert.True(res2.Succeeded); var res3 = await Tracklist.GetRepeat(); Assert.True(res3.Succeeded); var res4 = await Tracklist.GetSingle(); Assert.True(res4.Succeeded); var recieved = false; CoreListener.OptionsChanged += (sender, ev) => { recieved = true; }; var res12 = await Tracklist.SetConsume(!res1.Result); Assert.True(res12); await Task.Delay(WaitMsec); Assert.True(recieved); recieved = false; var res22 = await Tracklist.SetRandom(!res2.Result); Assert.True(res22); await Task.Delay(WaitMsec); Assert.True(recieved); recieved = false; var res32 = await Tracklist.SetRepeat(!res3.Result); Assert.True(res32); await Task.Delay(WaitMsec); Assert.True(recieved); recieved = false; var res42 = await Tracklist.SetSingle(!res4.Result); Assert.True(res42); await Task.Delay(WaitMsec); Assert.True(recieved); }