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); }
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); }
public void TestChannelRoundTrip(byte channelId) { Assert.Equal(channelId, Channel(CommandPacking.Channel(channelId))); }