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);
        }
示例#2
0
 public void TestChannelStateOpRoundTrip(PlaybackState state)
 {
     Assert.Equal(state, state.AsPlaybackOp().AsPlaybackState());
 }
示例#3
0
        /// <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));
        }