public void TestDecode_PlaybackStateChange(PlaybackState state)
        {
            var command = new PlaybackCommand(state.AsPlaybackOp(), ChannelId);

            var message = DecodeAndAssertMessageType <PlaybackStateChangeArgs>(command);

            Assert.Equal(ChannelId, message.ChannelId);
            Assert.Equal(state, message.State);
        }
 public void TestChannelStateOpRoundTrip(PlaybackState state)
 {
     Assert.Equal(state, state.AsPlaybackOp().AsPlaybackState());
 }
        /// <summary>
        ///     Asks the server to set this channel's state to <see cref="state" />.
        /// </summary>
        /// <param name="state">The intended new state of the channel.</param>
        public void SetState(PlaybackState state)
        {
            var cmd = PlaybackCommand(state.AsPlaybackOp());

            Send(new MessageBuilder(cmd));
        }