public void ReadHexTest(string hexStr) { byte[] bytes = "7E0000000000000000000000ABCDEF12347E".ToHexBytes(); JT808MessagePackReader jT808MessagePackReader = new JT808MessagePackReader(bytes); Assert.Equal(JT808Package.BeginFlag, jT808MessagePackReader.ReadStart()); //0000000000000000000000ABCDEF1234 Assert.Equal(hexStr, jT808MessagePackReader.ReadHex(16)); Assert.Equal(JT808Package.EndFlag, jT808MessagePackReader.ReadEnd()); }