Пример #1
0
        public void TestPacked_ChannelOnly()
        {
            var expected = (ushort)(
                CommandGroup.Playback.ToWordBits()
                | PlaybackOp.Play.ToWordBits()
                | CommandPacking.Channel(42));

            var unpacked = new PlaybackCommand(PlaybackOp.Play, 42);
            var actual   = unpacked.Packed;

            Assert.Equal(expected, actual);
        }
Пример #2
0
        public void TestPacked_ChannelOnly()
        {
            var expected = (ushort)(CommandGroup.Playlist.ToWordBits() | PlaylistOp.ResetPlaylist.ToWordBits() | CommandPacking.Channel(63));

            var unpacked = new PlaylistCommand(PlaylistOp.ResetPlaylist, 63);
            var actual   = unpacked.Packed;

            Assert.Equal(expected, actual);
        }
Пример #3
0
 public void TestChannelRoundTrip(byte channelId)
 {
     Assert.Equal(channelId, Channel(CommandPacking.Channel(channelId)));
 }